From: Patrick McHardy <kaber@trash.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH nft] proto: fix VLAN header definition
Date: Fri, 27 Nov 2015 09:13:34 +0000 [thread overview]
Message-ID: <1448615614-16510-1-git-send-email-kaber@trash.net> (raw)
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", ðertype_type, vlan_type),
},
};
--
2.5.0
next reply other threads:[~2015-11-27 9:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 9:13 Patrick McHardy [this message]
2015-11-27 9:49 ` [PATCH nft] proto: fix VLAN header definition 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448615614-16510-1-git-send-email-kaber@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).