diff --git a/RELNOTES b/RELNOTES index 6aa9460c..0aed7074 100644 --- a/RELNOTES +++ b/RELNOTES @@ -52,6 +52,14 @@ ISC DHCP is open source software maintained by Internet Systems Consortium. This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). + Changes since 4.3.2c1 + +- Corrected a compilation error introduced by the fix for ISC-Bugs #37415. + The error occurs on Linux variants that do not support VLAN tag information + in packet auxiliary data. The configure script now only enables inclusion + of the VLAN tag-based logic if it is supported by the underlying OS. + [ISC-Bugs #38677] + Changes since 4.3.2b1 - Specifying the option, --disable-debug, on the configure script command line diff --git a/common/lpf.c b/common/lpf.c index 37cb99eb..cd430dd7 100644 --- a/common/lpf.c +++ b/common/lpf.c @@ -398,7 +398,8 @@ ssize_t receive_packet (interface, buf, len, from, hfrom) * NICs perform VLAN encapsulation, while drivers for PCnet series * do not, for example. The linux kernel makes stripped vlan info * visible to user space via CMSG/auxdata, this appears to not be - * true for BSD OSs.) + * true for BSD OSs.). NOTE: this is only supported on linux flavors + * which define the tpacket_auxdata.tp_vlan_tci. * * b. Determine if checksum is valid for use. It may not be if * checksum offloading is enabled on the interface. */ @@ -409,8 +410,11 @@ ssize_t receive_packet (interface, buf, len, from, hfrom) cmsg->cmsg_type == PACKET_AUXDATA) { struct tpacket_auxdata *aux = (void *)CMSG_DATA(cmsg); /* Discard packets with stripped vlan id */ + +#ifdef VLAN_TCI_PRESENT if (aux->tp_vlan_tci != 0) return 0; +#endif csum_ready = ((aux->tp_status & TP_STATUS_CSUMNOTREADY) ? 0 : 1); diff --git a/configure b/configure index db9eada5..2f2a2c50 100755 --- a/configure +++ b/configure @@ -6570,6 +6570,16 @@ fi fi +ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "#include +" +if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then : + +$as_echo "#define VLAN_TCI_PRESENT 1" >>confdefs.h + + +fi + + libbind= # Check whether --with-libbind was given. diff --git a/configure.ac b/configure.ac index e569f157..ead0bc77 100644 --- a/configure.ac +++ b/configure.ac @@ -576,6 +576,10 @@ AC_CHECK_MEMBER(struct msghdr.msg_control,, #include ]) +AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci, + [AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])] + ,, [#include ]) + libbind= AC_ARG_WITH(libbind, AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH diff --git a/includes/config.h.in b/includes/config.h.in index 6d07e9f0..8c173385 100644 --- a/includes/config.h.in +++ b/includes/config.h.in @@ -185,6 +185,9 @@ /* Version number of package */ #undef VERSION +/* tpacket_auxdata.tp_vlan_tci present */ +#undef VLAN_TCI_PRESENT + /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD