From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft 1/4] src: vlan: allow matching vlan id insider 802.1ad frame
Date: Thu, 1 Apr 2021 16:08:43 +0200 [thread overview]
Message-ID: <20210401140846.24452-2-fw@strlen.de> (raw)
In-Reply-To: <20210401140846.24452-1-fw@strlen.de>
This makes "ether type 0x88a8 vlan id 342" work.
Before this change, nft would still insert a dependency on 802.1q so the
rule would never match.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
src/proto.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/proto.c b/src/proto.c
index b75626df2861..b6466f8b65d4 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -1027,6 +1027,7 @@ const struct proto_desc proto_vlan = {
PROTO_LINK(__constant_htons(ETH_P_ARP), &proto_arp),
PROTO_LINK(__constant_htons(ETH_P_IPV6), &proto_ip6),
PROTO_LINK(__constant_htons(ETH_P_8021Q), &proto_vlan),
+ PROTO_LINK(__constant_htons(ETH_P_8021AD), &proto_vlan),
},
.templates = {
@@ -1099,6 +1100,7 @@ const struct proto_desc proto_eth = {
PROTO_LINK(__constant_htons(ETH_P_ARP), &proto_arp),
PROTO_LINK(__constant_htons(ETH_P_IPV6), &proto_ip6),
PROTO_LINK(__constant_htons(ETH_P_8021Q), &proto_vlan),
+ PROTO_LINK(__constant_htons(ETH_P_8021AD), &proto_vlan),
},
.templates = {
[ETHHDR_DADDR] = ETHHDR_ADDR("daddr", ether_dhost),
@@ -1124,6 +1126,7 @@ const struct proto_desc proto_netdev = {
PROTO_LINK(__constant_htons(ETH_P_ARP), &proto_arp),
PROTO_LINK(__constant_htons(ETH_P_IPV6), &proto_ip6),
PROTO_LINK(__constant_htons(ETH_P_8021Q), &proto_vlan),
+ PROTO_LINK(__constant_htons(ETH_P_8021AD), &proto_vlan),
},
.templates = {
[0] = PROTO_META_TEMPLATE("protocol", ðertype_type, NFT_META_PROTOCOL, 16),
--
2.26.3
next prev parent reply other threads:[~2021-04-01 17:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 14:08 [PATCH nft 0/4] Add support for 8021.AD frame matching Florian Westphal
2021-04-01 14:08 ` Florian Westphal [this message]
2021-04-01 14:08 ` [PATCH nft 2/4] proto: add 8021ad as mnemonic for IEEE 802.1AD (0x88a8) ether type Florian Westphal
2021-04-01 14:08 ` [PATCH nft 3/4] payload: be careful on vlan dependency removal Florian Westphal
2021-04-01 14:08 ` [PATCH nft 4/4] tests: add 8021.AD vlan test cases Florian Westphal
2021-04-02 10:54 ` [PATCH nft 5/4] proto: replace vlan ether type with 8021q Florian Westphal
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=20210401140846.24452-2-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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).