netfilter: flowtable: incorrect pppoe tuple
[ Upstream commit6db5dc7b35
] pppoe traffic reaching ingress path does not match the flowtable entry because the pppoe header is expected to be at the network header offset. This bug causes a mismatch in the flow table lookup, so pppoe packets enter the classical forwarding path. Fixes:72efd585f7
("netfilter: flowtable: add pppoe support") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8bf7c76a2a
commit
f1c3c61701
@ -156,7 +156,7 @@ static void nf_flow_tuple_encap(struct sk_buff *skb,
|
|||||||
tuple->encap[i].proto = skb->protocol;
|
tuple->encap[i].proto = skb->protocol;
|
||||||
break;
|
break;
|
||||||
case htons(ETH_P_PPP_SES):
|
case htons(ETH_P_PPP_SES):
|
||||||
phdr = (struct pppoe_hdr *)skb_mac_header(skb);
|
phdr = (struct pppoe_hdr *)skb_network_header(skb);
|
||||||
tuple->encap[i].id = ntohs(phdr->sid);
|
tuple->encap[i].id = ntohs(phdr->sid);
|
||||||
tuple->encap[i].proto = skb->protocol;
|
tuple->encap[i].proto = skb->protocol;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user