Skip to content

Commit

Permalink
netfilter: nft_inner: fix return value check in nft_inner_parse_l2l3()
Browse files Browse the repository at this point in the history
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: 3a07327 ("netfilter: nft_inner: support for inner tunnel header matching")
Signed-off-by: Peng Wu <wupeng58@huawei.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Peng Wu authored and Pablo Neira Ayuso committed Nov 1, 2022
1 parent 6639412 commit 7394c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nft_inner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7394c2d

Please sign in to comment.