Skip to contentSkip to conversation

ip6_vti: set netns_immutable on the fallback device.

PATCH Applied Eric Dumazet 3 participants 3 messages Jun 8 – Jun 10

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

PATCH 1/1 ip6_vti: set netns_immutable on the fallback device.

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.

Fixes 61220ab34948 ("vti6: Enable namespace changing")
Cc Nicolas Dichtel <[email protected]>
Cc Steffen Klassert <[email protected]>
---
 net/ipv6/ip6_vti.c | 1 +
 1 file changed, 1 insertion(+)
net/ipv6/ip6_vti.c +1 -0
index df793c8bfffb0a26ea7f54933b88bccc9b1aa495..d2b74a6f2cf62dbb752d8842e1a4d33fc8392d41 100644
@@ -1159,6 +1159,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_immutable = true;
 
 	err = vti6_fb_tnl_dev_init(ip6n->fb_tnl_dev);
 	if (err < 0)
Signature · 1 line
2.54.0.1032.g2f8565e1d1-goog
Reviewed-by on v1 1/1
#1 lore raw

Le 08/06/2026 à 17:59, Eric Dumazet a écrit :

Quoted 7 lines

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.

Quoted 5 lines
Fixes 61220ab34948 ("vti6: Enable namespace changing")
Cc Nicolas Dichtel <[email protected]>
Cc Steffen Klassert <[email protected]>
#2 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Mon, 8 Jun 2026 15:59:18 +0000 you wrote:

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.

[...]

Here is the summary with links:
- [net] ip6_vti: set netns_immutable on the fallback device.

    https://git.kernel.org/netdev/net/c/d289d5307762

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html