netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] proto: fix VLAN header definition
@ 2015-11-27  9:13 Patrick McHardy
  2015-11-27  9:49 ` Florian Westphal
  0 siblings, 1 reply; 15+ messages in thread
From: Patrick McHardy @ 2015-11-27  9:13 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

The VID is located after Priority and CFI.

Signed-off-by: Patrick McHardy <kaber@trash.net>
---
 include/proto.h | 4 ++--
 src/proto.c     | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/proto.h b/include/proto.h
index 974116f..d90bccd 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -159,9 +159,9 @@ enum eth_hdr_fields {
 
 enum vlan_hdr_fields {
 	VLANHDR_INVALID,
-	VLANHDR_VID,
-	VLANHDR_CFI,
 	VLANHDR_PCP,
+	VLANHDR_CFI,
+	VLANHDR_VID,
 	VLANHDR_TYPE,
 };
 
diff --git a/src/proto.c b/src/proto.c
index 0fe0b88..f2cf297 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -730,9 +730,9 @@ const struct proto_desc proto_vlan = {
 
 	},
 	.templates	= {
-		[VLANHDR_VID]		= VLANHDR_BITFIELD("id", 0, 12),
-		[VLANHDR_CFI]		= VLANHDR_BITFIELD("cfi", 12, 1),
-		[VLANHDR_PCP]		= VLANHDR_BITFIELD("pcp", 13, 3),
+		[VLANHDR_PCP]		= VLANHDR_BITFIELD("pcp", 0, 3),
+		[VLANHDR_CFI]		= VLANHDR_BITFIELD("cfi", 3, 1),
+		[VLANHDR_VID]		= VLANHDR_BITFIELD("id", 4, 12),
 		[VLANHDR_TYPE]		= VLANHDR_TYPE("type", &ethertype_type, vlan_type),
 	},
 };
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-11-30 13:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27  9:13 [PATCH nft] proto: fix VLAN header definition Patrick McHardy
2015-11-27  9:49 ` Florian Westphal
2015-11-27  9:54   ` Patrick McHardy
2015-11-27 10:34     ` Florian Westphal
2015-11-27 10:42       ` Florian Westphal
2015-11-27 10:49         ` Patrick McHardy
2015-11-27 10:54           ` Florian Westphal
2015-11-27 11:00             ` Patrick McHardy
2015-11-28 23:32             ` Pablo Neira Ayuso
2015-11-29  0:09               ` Florian Westphal
2015-11-29 22:00                 ` Pablo Neira Ayuso
2015-11-29 22:37                   ` Florian Westphal
2015-11-30 12:31                     ` Pablo Neira Ayuso
2015-11-30 13:53                       ` Florian Westphal
2015-11-30 13:57                         ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).