Skip to contentSkip to conversation

Please backport d289d5307762 ("ip6_vti: set netns_immutable on the fallback device.") to 6.12.y.

PATCH Applied Salvatore Bonaccorso 2 participants 2 messages Jun 17 – Jun 21

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi

d289d5307762 ("ip6_vti: set netns_immutable on the fallback device.") was already queued for 7.0.13-rc1 and 6.18.36-rc1:
https://lore.kernel.org/all/[email protected]/
https://lore.kernel.org/all/[email protected]/
but not for the older series as needed.

For versions which do not have 0c493da86374 ("net: rename netns_local to netns_immutable") in v6.15-rc1 this would need backporting.

Below is the backported patch for 6.12.y.

I have a question: Given the commit say "ip6_vti: set netns_immutable on the fallback device.", but this won't be anymore a correct statement, should 6.12.y get a "dedicated" backport instead of claiming it the upstream commit?

Unfortunately the same change won't apply further down and will need more work.

Regards,
Salvatore

From b004312340b7c6ec2d757c24279f5a1d0b3a831a Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Mon, 8 Jun 2026 15:59:18 +0000
Subject: [PATCH] ip6_vti: set netns_immutable on the fallback device.

[ Upstream commit d289d5307762d1838aaece22c6b6fcad9e8865f9 ]

john1988 and Noam Rathaus reported that vti6_init_net() does not set the netns_immutable flag on the per-netns fallback tunnel device (ip6_vti0).

Other similar tunnel drivers (like ip6_tunnel, sit, ip6_gre, and ip_tunnel) correctly set this flag during their fallback device initialization to prevent them from being moved to another network namespace.

[Salvatore Bonaccorso: Backport for version without 0c493da86374 ("net:
rename netns_local to netns_immutable") in v6.15-rc1 and use netns_local.]

---
 net/ipv6/ip6_vti.c | 1 +
 1 file changed, 1 insertion(+)
net/ipv6/ip6_vti.c +1 -0
index 2ac88593a954..892533dbb527 100644
@@ -1157,6 +1157,7 @@ static int __net_init vti6_init_net(struct net *net)
 		goto err_alloc_dev;
 	dev_net_set(ip6n->fb_tnl_dev, net);
 	ip6n->fb_tnl_dev->rtnl_link_ops = &vti6_link_ops;
+	ip6n->fb_tnl_dev->netns_local = true;
 
 	err = vti6_fb_tnl_dev_init(ip6n->fb_tnl_dev);
 	if (err < 0)
Signature · 1 line
2.53.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Salvatore Bonaccorso

I have a question: Given the commit say "ip6_vti: set netns_immutable on the fallback device.", but this won't be anymore a correct statement, should 6.12.y get a "dedicated" backport instead of claiming it the upstream commit?

Queued for 6.12, thanks.

Signature · 2 lines
Thanks,
Sasha