ip6_vti: set netns_immutable on the fallback device.
Subsystems (4)
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.
--- net/ipv6/ip6_vti.c | 1 + 1 file changed, 1 insertion(+)
net/ipv6/ip6_vti.c +1 -0
@@ -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
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 thenetns_immutableflag on the per-netns fallback tunnel device (ip6_vti0).Other similar tunnel drivers (like
ip6_tunnel, sit,ip6_gre, andip_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")Reported-by Noam Rathaus <[email protected]>Signed-off-by Eric Dumazet <[email protected]>Cc Nicolas Dichtel <[email protected]>Cc Steffen Klassert <[email protected]>
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 thenetns_immutableflag on the per-netns fallback tunnel device (ip6_vti0).Other similar tunnel drivers (like
ip6_tunnel, sit,ip6_gre, andip_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