summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2018-01-25 15:01:38 +0100
committerDavid S. Miller <davem@davemloft.net>2018-01-29 12:23:51 -0500
commitc36ac8e2307334c83e8bf81ed361f0e4959d995f (patch)
tree9a0a8a13d2fa7308c88a6ac27631d3d852a8b20c
parent6b9e65474b5608c2c8f80aea4d79f8c485b2db8f (diff)
downloadlinux-c36ac8e2307334c83e8bf81ed361f0e4959d995f.tar.gz
linux-c36ac8e2307334c83e8bf81ed361f0e4959d995f.tar.bz2
linux-c36ac8e2307334c83e8bf81ed361f0e4959d995f.zip
dev: always advertise the new nsid when the netns iface changes
The user should be able to follow any interface that moves to another netns. There is no reason to hide physical interfaces. CC: Jiri Benc <jbenc@redhat.com> CC: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Reviewed-by: Jiri Benc <jbenc@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/dev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 4670ccabe23a..59987eb6511a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -8529,10 +8529,7 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
rcu_barrier();
call_netdevice_notifiers(NETDEV_UNREGISTER_FINAL, dev);
- if (dev->rtnl_link_ops && dev->rtnl_link_ops->get_link_net)
- new_nsid = peernet2id_alloc(dev_net(dev), net);
- else
- new_nsid = peernet2id(dev_net(dev), net);
+ new_nsid = peernet2id_alloc(dev_net(dev), net);
rtmsg_ifinfo_newnet(RTM_DELLINK, dev, ~0U, GFP_KERNEL, &new_nsid);
/*