From: wenxu <wenxu@xxxxxxxxx> vlan_tpid of flow_dissector_key_vlan should be set as h_vlan_proto but not h_vlan_encapsulated_proto. Fixes: a82055af5959 ("netfilter: nft_payload: add VLAN offload support") Fixes: 89d8fd44abfb ("netfilter: nft_payload: add C-VLAN offload support") Signed-off-by: wenxu <wenxu@xxxxxxxxx> --- net/netfilter/nft_payload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_payload.c index cb1c8c2..4b582eb 100644 --- a/net/netfilter/nft_payload.c +++ b/net/netfilter/nft_payload.c @@ -229,7 +229,7 @@ static int nft_payload_offload_ll(struct nft_offload_ctx *ctx, NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_VLAN, vlan, vlan_tci, sizeof(__be16), reg); break; - case offsetof(struct vlan_ethhdr, h_vlan_encapsulated_proto): + case offsetof(struct vlan_ethhdr, h_vlan_proto): if (!nft_payload_offload_mask(reg, priv->len, sizeof(__be16))) return -EOPNOTSUPP; @@ -244,7 +244,7 @@ static int nft_payload_offload_ll(struct nft_offload_ctx *ctx, NFT_OFFLOAD_MATCH(FLOW_DISSECTOR_KEY_CVLAN, vlan, vlan_tci, sizeof(__be16), reg); break; - case offsetof(struct vlan_ethhdr, h_vlan_encapsulated_proto) + + case offsetof(struct vlan_ethhdr, h_vlan_proto) + sizeof(struct vlan_hdr): if (!nft_payload_offload_mask(reg, priv->len, sizeof(__be16))) return -EOPNOTSUPP; -- 1.8.3.1