diff options
| author | Justin Iurman <justin.iurman@uliege.be> | 2025-03-04 19:10:39 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-13 12:51:07 +0100 |
| commit | 82043c99801e35ee7807134920c2ed4312ab4b67 (patch) | |
| tree | 39dbd92cb9d37916e69ee9d66773abd2fa7906ed /net | |
| parent | 5cb300dcdd27e6a351ac02541e0231261c775852 (diff) | |
| download | linux-82043c99801e35ee7807134920c2ed4312ab4b67.tar.gz linux-82043c99801e35ee7807134920c2ed4312ab4b67.tar.bz2 linux-82043c99801e35ee7807134920c2ed4312ab4b67.zip | |
net: ipv6: fix dst ref loop in ila lwtunnel
[ Upstream commit 0e7633d7b95b67f1758aea19f8e85621c5f506a3 ]
This patch follows commit 92191dd10730 ("net: ipv6: fix dst ref loops in
rpl, seg6 and ioam6 lwtunnels") and, on a second thought, the same patch
is also needed for ila (even though the config that triggered the issue
was pathological, but still, we don't want that to happen).
Fixes: 79ff2fc31e0f ("ila: Cache a route to translated address")
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Link: https://patch.msgid.link/20250304181039.35951-1-justin.iurman@uliege.be
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv6/ila/ila_lwt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ila/ila_lwt.c b/net/ipv6/ila/ila_lwt.c index 9d37f7164e73..6d37dda3d26f 100644 --- a/net/ipv6/ila/ila_lwt.c +++ b/net/ipv6/ila/ila_lwt.c @@ -88,7 +88,8 @@ static int ila_output(struct net *net, struct sock *sk, struct sk_buff *skb) goto drop; } - if (ilwt->connected) { + /* cache only if we don't create a dst reference loop */ + if (ilwt->connected && orig_dst->lwtstate != dst->lwtstate) { local_bh_disable(); dst_cache_set_ip6(&ilwt->dst_cache, dst, &fl6.saddr); local_bh_enable(); |
