Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341877
b: refs/heads/master
c: 4e66ae2
h: refs/heads/master
i:
  341875: 43378ef
v: v3
  • Loading branch information
Serge Hallyn authored and David S. Miller committed Dec 4, 2012
1 parent 5b74103 commit a83735a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 008d845cf65c3153bbcfa2f1cb3369a99e12de02
refs/heads/master: 4e66ae2ea371cf431283e2cb95480eb860432856
6 changes: 6 additions & 0 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -6418,6 +6418,9 @@ 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 */
kobject_uevent(&dev->dev.kobj, KOBJ_REMOVE);

/* Actually switch the network namespace */
dev_net_set(dev, net);

Expand All @@ -6429,6 +6432,9 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
dev->iflink = dev->ifindex;
}

/* Send a netdev-add uevent to the new namespace */
kobject_uevent(&dev->dev.kobj, KOBJ_ADD);

/* Fixup kobjects */
err = device_rename(&dev->dev, dev->name);
WARN_ON(err);
Expand Down

0 comments on commit a83735a

Please sign in to comment.