[openwrt/openwrt] generic l2tp: drop flow hash on forward
LEDE Commits
lede-commits at lists.infradead.org
Mon Feb 26 13:18:15 PST 2024
blocktrron pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/35a5e62da7275a4a1423df6238340dd08eeff3c9
commit 35a5e62da7275a4a1423df6238340dd08eeff3c9
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Mon Feb 26 14:43:09 2024 +0100
generic l2tp: drop flow hash on forward
Drop the flow-hash of the skb when forwarding to the L2TP netdev.
This avoids the L2TP qdisc from using the flow-hash from the outer
packet, which is identical for every flow within the tunnel.
This does not affect every platform but is specific for the ethernet
driver. It depends on the platform including L4 information in the
flow-hash.
Signed-off-by: David Bauer <mail at david-bauer.net>
---
.../778-net-l2tp-drop-flow-hash-on-forward.patch | 31 ++++++++++++++++++++++
.../778-net-l2tp-drop-flow-hash-on-forward.patch | 31 ++++++++++++++++++++++
2 files changed, 62 insertions(+)
diff --git a/target/linux/generic/pending-5.15/778-net-l2tp-drop-flow-hash-on-forward.patch b/target/linux/generic/pending-5.15/778-net-l2tp-drop-flow-hash-on-forward.patch
new file mode 100644
index 0000000000..a2c0edcbbf
--- /dev/null
+++ b/target/linux/generic/pending-5.15/778-net-l2tp-drop-flow-hash-on-forward.patch
@@ -0,0 +1,31 @@
+From 4a44a52f16ccd3d03e0cb5fb437a5eb31a5f9f05 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Mon, 26 Feb 2024 21:39:34 +0100
+Subject: [PATCH] net l2tp: drop flow hash on forward
+
+Drop the flow-hash of the skb when forwarding to the L2TP netdev.
+
+This avoids the L2TP qdisc from using the flow-hash from the outer
+packet, which is identical for every flow within the tunnel.
+
+This does not affect every platform but is specific for the ethernet
+driver. It depends on the platform including L4 information in the
+flow-hash.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ net/l2tp/l2tp_eth.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/net/l2tp/l2tp_eth.c
++++ b/net/l2tp/l2tp_eth.c
+@@ -136,6 +136,9 @@ static void l2tp_eth_dev_recv(struct l2t
+ /* checksums verified by L2TP */
+ skb->ip_summed = CHECKSUM_NONE;
+
++ /* drop outer flow-hash */
++ skb_clear_hash(skb);
++
+ skb_dst_drop(skb);
+ nf_reset_ct(skb);
+
diff --git a/target/linux/generic/pending-6.1/778-net-l2tp-drop-flow-hash-on-forward.patch b/target/linux/generic/pending-6.1/778-net-l2tp-drop-flow-hash-on-forward.patch
new file mode 100644
index 0000000000..a2c0edcbbf
--- /dev/null
+++ b/target/linux/generic/pending-6.1/778-net-l2tp-drop-flow-hash-on-forward.patch
@@ -0,0 +1,31 @@
+From 4a44a52f16ccd3d03e0cb5fb437a5eb31a5f9f05 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Mon, 26 Feb 2024 21:39:34 +0100
+Subject: [PATCH] net l2tp: drop flow hash on forward
+
+Drop the flow-hash of the skb when forwarding to the L2TP netdev.
+
+This avoids the L2TP qdisc from using the flow-hash from the outer
+packet, which is identical for every flow within the tunnel.
+
+This does not affect every platform but is specific for the ethernet
+driver. It depends on the platform including L4 information in the
+flow-hash.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ net/l2tp/l2tp_eth.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/net/l2tp/l2tp_eth.c
++++ b/net/l2tp/l2tp_eth.c
+@@ -136,6 +136,9 @@ static void l2tp_eth_dev_recv(struct l2t
+ /* checksums verified by L2TP */
+ skb->ip_summed = CHECKSUM_NONE;
+
++ /* drop outer flow-hash */
++ skb_clear_hash(skb);
++
+ skb_dst_drop(skb);
+ nf_reset_ct(skb);
+
More information about the lede-commits
mailing list