]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.4/net-l2tp-drop-flow-hash-on-forward.patch
f0aa93959a4b8b34798c8eee0e4c822962520bf3
[thirdparty/kernel/stable-queue.git] / queue-5.4 / net-l2tp-drop-flow-hash-on-forward.patch
1 From dbb91a698082fc8c9e811399364deab39fecca19 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Wed, 24 Apr 2024 19:11:10 +0200
4 Subject: net l2tp: drop flow hash on forward
5
6 From: David Bauer <mail@david-bauer.net>
7
8 [ Upstream commit 42f853b42899d9b445763b55c3c8adc72be0f0e1 ]
9
10 Drop the flow-hash of the skb when forwarding to the L2TP netdev.
11
12 This avoids the L2TP qdisc from using the flow-hash from the outer
13 packet, which is identical for every flow within the tunnel.
14
15 This does not affect every platform but is specific for the ethernet
16 driver. It depends on the platform including L4 information in the
17 flow-hash.
18
19 One such example is the Mediatek Filogic MT798x family of networking
20 processors.
21
22 Fixes: d9e31d17ceba ("l2tp: Add L2TP ethernet pseudowire support")
23 Acked-by: James Chapman <jchapman@katalix.com>
24 Signed-off-by: David Bauer <mail@david-bauer.net>
25 Reviewed-by: Simon Horman <horms@kernel.org>
26 Link: https://lore.kernel.org/r/20240424171110.13701-1-mail@david-bauer.net
27 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
28 Signed-off-by: Sasha Levin <sashal@kernel.org>
29 ---
30 net/l2tp/l2tp_eth.c | 3 +++
31 1 file changed, 3 insertions(+)
32
33 diff --git a/net/l2tp/l2tp_eth.c b/net/l2tp/l2tp_eth.c
34 index d3b520b9b2c9d..2c5853597aa90 100644
35 --- a/net/l2tp/l2tp_eth.c
36 +++ b/net/l2tp/l2tp_eth.c
37 @@ -149,6 +149,9 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb,
38 /* checksums verified by L2TP */
39 skb->ip_summed = CHECKSUM_NONE;
40
41 + /* drop outer flow-hash */
42 + skb_clear_hash(skb);
43 +
44 skb_dst_drop(skb);
45 nf_reset_ct(skb);
46
47 --
48 2.43.0
49