Skip to content

Commit

Permalink
dev: always advertise the new nsid when the netns iface changes
Browse files Browse the repository at this point in the history
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 <[email protected]>
CC: Christian Brauner <[email protected]>
Signed-off-by: Nicolas Dichtel <[email protected]>
Reviewed-by: Jiri Benc <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
NicolasDichtel authored and davem330 committed Jan 29, 2018
1 parent 6b9e654 commit c36ac8e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit c36ac8e

Please sign in to comment.