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