ancient berkeley packet munging bug
K. Richard Pixley
rpixley at sj.symbol.com
Thu Sep 2 19:38:50 UTC 2004
At least one operating system vendor, (LynxOs from Lynuxworks,
http://lnxw.com), releases a version of bpf which munges outgoing
packets, although in a predicatable fashion. It would appear from
this info: http://www.whitefang.com/rin/rawfaq.html#14, as though this
were actually an ancient bug inherited from berkeley which was never
corrected.
This bug was reported to Lynuxwork by a supported customer, (yours
truley), on August 25, 2004 as call reference number 46676.
In the mean time, this patch works around the problem.
--rich
diff -u -r dhcp-3.0.1/common/ethernet.c dhcp-work2/common/ethernet.c
--- dhcp-3.0.1/common/ethernet.c 2004-06-10 10:59:17.000000000 -0700
+++ dhcp-work2/common/ethernet.c 2004-08-27 09:46:57.000000000 -0700
@@ -65,8 +65,11 @@
else
memset (eh.ether_shost, 0x00, sizeof (eh.ether_shost));
+#ifndef HAVE_ANCIENT_BERKELEY_PACKET_MUNGING_BUG
eh.ether_type = htons (ETHERTYPE_IP);
-
+#else
+ eh.ether_type = ETHERTYPE_IP;
+#endif
memcpy (&buf [*bufix], &eh, ETHER_HEADER_SIZE);
*bufix += ETHER_HEADER_SIZE;
}
More information about the dhcp-hackers
mailing list