Thread (13 messages) flat view 13 messages, 3 authors, 11d ago

Re: [PATCH v2 net-next 7/7] ip_tunnel: Support per-netns device unregistration.

From: Ido Schimmel <idosch@nvidia.com>
Date: 2026-09-10 17:13:22

On Wed, Sep 09, 2026 at 11:43:50PM +0000, Kuniyuki Iwashima wrote:
quoted hunk ↗ jump to hunk
@@ -920,6 +927,11 @@ int ip_tunnel_ctl(struct net_device *dev, struct ip_tunnel_parm_kern *p,
 
 	mutex_lock(&itn->tunnels_lock);
 
+	if (!itn->fb_tunnel_dev) {
+		err = -EBUSY;
+		goto done;
+	}
This is a problem in network namespaces where fallback tunnels are not
created and the pointer is set to NULL.

Before:

# sysctl -wq net.core.fb_tunnels_only_for_init_net=1
# ip netns add bla
# ip -n bla link add name gre1 up type gre local 192.0.2.1 remote 198.51.100.1
# ip -n bla tunnel show gre1
gre1: gre/ip remote 198.51.100.1 local 192.0.2.1 ttl inherit

After:

# sysctl -wq net.core.fb_tunnels_only_for_init_net=1
# ip netns add bla
# ip -n bla link add name gre1 up type gre local 192.0.2.1 remote 198.51.100.1
# ip -n bla tunnel show gre1
get tunnel "gre1" failed: Device or resource busy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help