# A patch to add complete support for the BIOCSHDRCMPLT ioctl to Mac OS X # Panther (Darwin). This is also known as ETHERSPOOF. # # This patch improves the functionality provided in the ETHERSPOOF patch # by Peter Bartoli. NOTE: This patch is incompatible with the ETHERSPOOF patch. # # Instead of (potentially) altering the source Ethernet address of all # AF_UNSPEC packets, this patch only affects packets when the BIOCSHDRCMPLT # ioctl is used. In other words, this won't break dhcp. # # apply in the top level xnu-xxx source directory: # patch -p0 -b --verbose --suffix=.orig < BIOCSHDRCMPLT-panther.patch # # Then, build the kernel and install it as you normally would. --- bsd/net/ether_inet_pr_module.c.orig Fri Dec 19 17:36:53 2003 +++ bsd/net/ether_inet_pr_module.c Fri Jan 30 19:18:51 2004 @@ -280,6 +280,7 @@ *(u_short *)type = htons(ETHERTYPE_IP); break; + case pseudo_AF_HDRCMPLT: case AF_UNSPEC: m->m_flags &= ~M_LOOP; eh = (struct ether_header *)dst_netaddr->sa_data;