Commit 75d02fcf authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[master] Fixed unsupported vlan tag build issue

    Merges in rt38677
parent 280297bd
......@@ -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
......
......@@ -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);
......
......@@ -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 <linux/if_packet.h>
"
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.
......
......@@ -576,6 +576,10 @@ AC_CHECK_MEMBER(struct msghdr.msg_control,,
#include <sys/socket.h>
])
AC_CHECK_MEMBER(struct tpacket_auxdata.tp_vlan_tci,
[AC_DEFINE([VLAN_TCI_PRESENT], [1], [tpacket_auxdata.tp_vlan_tci present])]
,, [#include <linux/if_packet.h>])
libbind=
AC_ARG_WITH(libbind,
AS_HELP_STRING([--with-libbind=PATH],[bind includes and libraries are in PATH
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment