summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2015-09-23 09:58:53 -0400
committerThomas Markwalder <tmark@isc.org>2015-09-23 09:58:53 -0400
commit3faf80d291c4a6cba760fe3adc3c58361a74e70e (patch)
tree56a494967e7447033c0967652a43aa9501eaf8c5 /common
parent3d6679788acd73a7c7547391820bcc7b5e1364e5 (diff)
downloadisc-dhcp-3faf80d291c4a6cba760fe3adc3c58361a74e70e.tar.gz
[v4_1_esv] LPF now only uses 12-bit value from VLAN TCI for VID
Merges in rt40591.
Diffstat (limited to 'common')
-rw-r--r--common/lpf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/lpf.c b/common/lpf.c
index 211bffe9..9234c518 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -400,10 +400,10 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
if (cmsg->cmsg_level == SOL_PACKET &&
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)
+ /* Discard packets with stripped vlan id */
+ /* VLAN ID is only bottom 12-bits of TCI */
+ if (aux->tp_vlan_tci & 0x0fff)
return 0;
#endif