From: Peng Wu Date: Tue, 1 Nov 2022 01:37:28 +0000 (+0000) Subject: netfilter: nft_inner: fix return value check in nft_inner_parse_l2l3() X-Git-Tag: v6.2-rc1~99^2~210^2~4 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7394c2dd62dec8bdbe347d195c2dc1b332cc9ec5;p=tomoyo%2Ftomoyo-test1.git netfilter: nft_inner: fix return value check in nft_inner_parse_l2l3() In nft_inner_parse_l2l3(), the return value of skb_header_pointer() is 'veth' instead of 'eth' when case 'htons(ETH_P_8021Q)' and fix it. Fixes: 3a07327d10a0 ("netfilter: nft_inner: support for inner tunnel header matching") Signed-off-by: Peng Wu Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nft_inner.c b/net/netfilter/nft_inner.c index eae7caeff316..809f0d0787ec 100644 --- a/net/netfilter/nft_inner.c +++ b/net/netfilter/nft_inner.c @@ -72,7 +72,7 @@ static int nft_inner_parse_l2l3(const struct nft_inner *priv, break; case htons(ETH_P_8021Q): veth = skb_header_pointer(pkt->skb, off, sizeof(_veth), &_veth); - if (!eth) + if (!veth) return -1; outer_llproto = veth->h_vlan_encapsulated_proto;