[PATCH 1/1] dev_change_net_namespace: send a KOBJ_REMOVED to original netns
Serge Hallyn
serge.hallyn at canonical.com
Fri Oct 12 20:42:05 UTC 2012
Signed-off-by: Serge Hallyn <serge.hallyn at canonical.com>
---
net/core/dev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/core/dev.c b/net/core/dev.c
index e2215ee..8062a5a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6172,6 +6172,10 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
dev_uc_flush(dev);
dev_mc_flush(dev);
+ /* Send a netdev-removed uevent to the old namespace */
+#ifdef CONFIG_HOTPLUG
+ kobject_uevent(&dev->dev.kobj, KOBJ_REMOVE);
+#endif
/* Actually switch the network namespace */
dev_net_set(dev, net);
--
1.7.9.5
More information about the Containers
mailing list