[Devel] [PATCH hci-8.1 5/6] ms/ip6_vti: set netns_immutable on the fallback device.
Denis V. Lunev
den at openvz.org
Tue Nov 10 19:31:29 MSK 2026
From: Eric Dumazet <edumazet at google.com>
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")
Reported-by: Noam Rathaus <noamr at ssd-disclosure.com>
Signed-off-by: Eric Dumazet <edumazet at google.com>
Cc: Steffen Klassert <steffen.klassert at secunet.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel at 6wind.com>
Link: https://patch.msgid.link/20260608155918.787644-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba at kernel.org>
(cherry picked from commit d289d5307762d1838aaece22c6b6fcad9e8865f9)
https://virtuozzo.atlassian.net/browse/VSTOR-154348
Feature: fix ms/net
Signed-off-by: Denis V. Lunev <den at openvz.org>
---
net/ipv6/ip6_vti.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c
index 06fa55ddddca..420830c5e064 100644
--- a/net/ipv6/ip6_vti.c
+++ b/net/ipv6/ip6_vti.c
@@ -1171,6 +1171,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)
--
2.53.0
More information about the Devel
mailing list