Skip to contentSkip to conversation

netfilter: nft_inner: fix return value check in nft_inner_parse_l2l3()

PATCH Applied Peng Wu 2 participants 2 messages Nov 1, 2022

Subsystems (3)
lore
Share & tools
lore

Peng Wu

author
#0 lore raw

PATCH 1/1 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")
---
 net/netfilter/nft_inner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nft_inner.c +1 -1
index eae7caeff316..809f0d0787ec 100644
@@ -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;
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Peng Wu

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.

Applied to nf-next, thanks