1 From: Pablo Neira Ayuso <pablo@netfilter.org>
2 Date: Wed, 24 Mar 2021 02:30:42 +0100
3 Subject: [PATCH] netfilter: flowtable: add bridge vlan filtering support
5 Add the vlan tag based when PVID is set on.
7 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
10 --- a/net/netfilter/nft_flow_offload.c
11 +++ b/net/netfilter/nft_flow_offload.c
12 @@ -111,6 +111,18 @@ static void nft_dev_path_info(const stru
13 if (is_zero_ether_addr(info->h_source))
14 memcpy(info->h_source, path->dev->dev_addr, ETH_ALEN);
16 + switch (path->bridge.vlan_mode) {
17 + case DEV_PATH_BR_VLAN_TAG:
18 + info->encap[info->num_encaps].id = path->bridge.vlan_id;
19 + info->encap[info->num_encaps].proto = path->bridge.vlan_proto;
22 + case DEV_PATH_BR_VLAN_UNTAG:
25 + case DEV_PATH_BR_VLAN_KEEP:
28 info->xmit_type = FLOW_OFFLOAD_XMIT_DIRECT;