File 0025-master-LPF-now-only-uses-12-bit-value-from-VLAN-TCI-.patch of Package dhcp.24175

From f10cbbface262ba51394b2c8ccf402addf7bd6b1 Mon Sep 17 00:00:00 2001
From: Thomas Markwalder <tmark@isc.org>
Date: Wed, 23 Sep 2015 09:37:51 -0400
Subject: [PATCH] [master] LPF now only uses 12-bit value from VLAN TCI for VID

    Merges in rt40591.
    removed changes for RELNOTES - ndas@suse.de
---
 RELNOTES     | 7 +++++++
 common/lpf.c | 6 +++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/common/lpf.c b/common/lpf.c
index 7889b6bb..ee3820b6 100644
--- a/common/lpf.c
+++ b/common/lpf.c
@@ -422,10 +422,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
 
-- 
2.15.0

openSUSE Build Service is sponsored by