]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
dev: always advertise the new nsid when the netns iface changes
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 25 Jan 2018 14:01:38 +0000 (15:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 17:23:51 +0000 (12:23 -0500)
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>
net/core/dev.c

index 4670ccabe23a4993f3d10604ba2ec759e7cfa24f..59987eb6511aeb4ab263870e075be4a5be94fbe8 100644 (file)
@@ -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);
 
        /*