2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-01 14:55:30 +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

@@ -76,4 +76,5 @@ extern int h_errno;
#if defined (USE_DEFAULT_NETWORK)
# define USE_BPF
# define BROKEN_FREEBSD_BPF /* Fixed in 2.2 */
#endif

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;

View File

@@ -76,4 +76,5 @@ extern int h_errno;
#if defined (USE_DEFAULT_NETWORK)
# define USE_BPF
# define BROKEN_FREEBSD_BPF /* Fixed in 2.2 */
#endif

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;