Skip to content

Commit 0e7633d

Browse files
IurmanJPaolo Abeni
authored andcommitted
net: ipv6: fix dst ref loop in ila lwtunnel
This patch follows commit 92191dd ("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: 79ff2fc ("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>
1 parent cf7ee25 commit 0e7633d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ipv6/ila/ila_lwt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ static int ila_output(struct net *net, struct sock *sk, struct sk_buff *skb)
8888
goto drop;
8989
}
9090

91-
if (ilwt->connected) {
91+
/* cache only if we don't create a dst reference loop */
92+
if (ilwt->connected && orig_dst->lwtstate != dst->lwtstate) {
9293
local_bh_disable();
9394
dst_cache_set_ip6(&ilwt->dst_cache, dst, &fl6.saddr);
9495
local_bh_enable();

0 commit comments

Comments
 (0)