[PATCH-22.03 1/4] kernel: fix flowtable pppoe header offset bug

LiXiong Liu lxliu at ikuai8.com
Thu Nov 24 03:24:05 PST 2022


Signed-off-by: LiXiong Liu <lxliu at ikuai8.com>
---
 .../706-01-netfilter-flowtable-fix-pppoe-header-offset.patch  | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 target/linux/generic/pending-5.10/706-01-netfilter-flowtable-fix-pppoe-header-offset.patch

diff --git a/target/linux/generic/pending-5.10/706-01-netfilter-flowtable-fix-pppoe-header-offset.patch b/target/linux/generic/pending-5.10/706-01-netfilter-flowtable-fix-pppoe-header-offset.patch
new file mode 100644
index 0000000..97767d7
--- /dev/null
+++ b/target/linux/generic/pending-5.10/706-01-netfilter-flowtable-fix-pppoe-header-offset.patch
@@ -0,0 +1,11 @@
+--- a/netfilter/nf_flow_table_ip.c
++++ b/netfilter/nf_flow_table_ip.c
+@@ -158,7 +158,7 @@ static void nf_flow_tuple_encap(struct s
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		phdr = (struct pppoe_hdr *)skb_mac_header(skb);
++		phdr = (struct pppoe_hdr *)(skb_mac_header(skb) + ETH_HLEN);
+ 		tuple->encap[i].id = ntohs(phdr->sid);
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
-- 
2.7.4




More information about the openwrt-devel mailing list