Skip to content

Commit 6db5dc7

Browse files
committed
netfilter: flowtable: incorrect pppoe tuple
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: 72efd58 ("netfilter: flowtable: add pppoe support") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 87b3593 commit 6db5dc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_flow_table_ip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static void nf_flow_tuple_encap(struct sk_buff *skb,
157157
tuple->encap[i].proto = skb->protocol;
158158
break;
159159
case htons(ETH_P_PPP_SES):
160-
phdr = (struct pppoe_hdr *)skb_mac_header(skb);
160+
phdr = (struct pppoe_hdr *)skb_network_header(skb);
161161
tuple->encap[i].id = ntohs(phdr->sid);
162162
tuple->encap[i].proto = skb->protocol;
163163
break;

0 commit comments

Comments
 (0)