Re: Move interface across network namespaces
flat view
From: Renato Westphal <hidden>
Date: 2011-08-19 14:38:35
quoted hunk ↗ jump to hunk
quoted
Well, this regression was introduced by commit a2835763e130c343ac, which was merged into v2.6.34. Reverting parts of this commit makes the problem go away but breaks the support of "specifying device flags during device creation". I don't know the best way to fix this... any ideas?Everything going through dev_change_net_namespace already needs to be in the initialized state. So it looks like we just need to do: Does the patch below work for you? Eric ---diff --git a/net/core/dev.c b/net/core/dev.c index 17d67b5..bfbde69 100644 --- a/net/core/dev.c +++ b/net/core/dev.c@@ -6108,6 +6108,8 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const charcall_netdevice_notifiers(NETDEV_UNREGISTER, dev); call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev); + rtmsg_ifinfo(RTM_DELLINK, dev, ~0U); + /* * Flush the unicast and multicast chains */
This works pretty fine. Thanks! :) -- Renato Westphal