2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 06:15:55 +00:00

Work around FreeBSD BPF bug

This commit is contained in:
Ted Lemon
1996-06-11 08:30:41 +00:00
parent a0aee5f011
commit d99452d1a0
4 changed files with 12 additions and 0 deletions

View File

@@ -141,7 +141,12 @@ void assemble_hw_header (interface, buf, bufix, to)
sizeof (eh.ether_shost));
else
memset (eh.ether_shost, 0x00, sizeof (eh.ether_shost));
#ifdef BROKEN_FREEBSD_BPF /* Fixed in FreeBSD 2.2 */
eh.ether_type = ETHERTYPE_IP;
#else
eh.ether_type = htons (ETHERTYPE_IP);
#endif
memcpy (&buf [*bufix], &eh, sizeof eh);
*bufix += sizeof eh;