9262a08
From 7a1862a392038407371d6889e49b06848efa637f Mon Sep 17 00:00:00 2001
9262a08
From: Jiri Popelka <jpopelka@redhat.com>
9262a08
Date: Thu, 3 Sep 2015 18:25:42 +0200
9262a08
Subject: [PATCH] VLAN ID is only bottom 12-bits of TCI
9262a08
9262a08
The upper 4 bits contain metadata used for quality of service
9262a08
management.
9262a08
9262a08
TCI(16b) = PCP(3b) + DEI(1b) + VID(12b)
9262a08
9262a08
TCI = Tag control information
9262a08
PCP = Priority code point
9262a08
DEI = Drop eligible indicator
9262a08
VID = VLAN identifier
9262a08
---
9262a08
 common/lpf.c | 3 ++-
9262a08
 1 file changed, 2 insertions(+), 1 deletion(-)
9262a08
9262a08
diff --git a/common/lpf.c b/common/lpf.c
9262a08
index 7889b6b..4c835e6 100644
9262a08
--- a/common/lpf.c
9262a08
+++ b/common/lpf.c
9262a08
@@ -425,7 +425,8 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
9262a08
 			/* Discard packets with stripped vlan id */
9262a08
 
9262a08
 #ifdef VLAN_TCI_PRESENT
9262a08
-			if (aux->tp_vlan_tci != 0)
9262a08
+			/* VLAN ID is only bottom 12-bits of TCI */
9262a08
+			if (aux->tp_vlan_tci & 0x0fff)
9262a08
 				return 0;
9262a08
 #endif
9262a08
 
9262a08
-- 
9262a08
2.5.0
9262a08