Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96198
b: refs/heads/master
c: aca5139
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed May 8, 2008
1 parent cedf861 commit 6bfa714
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3261aff35cbc811fee0e23eaea277f1b7286eca
refs/heads/master: aca51397d01474f80cab8fc978559b45f2e453ad
8 changes: 5 additions & 3 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4480,17 +4480,19 @@ static void __net_exit default_device_exit(struct net *net)
rtnl_lock();
for_each_netdev_safe(net, dev, next) {
int err;
char fb_name[IFNAMSIZ];

/* Ignore unmoveable devices (i.e. loopback) */
if (dev->features & NETIF_F_NETNS_LOCAL)
continue;

/* Push remaing network devices to init_net */
err = dev_change_net_namespace(dev, &init_net, "dev%d");
snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex);
err = dev_change_net_namespace(dev, &init_net, fb_name);
if (err) {
printk(KERN_WARNING "%s: failed to move %s to init_net: %d\n",
printk(KERN_EMERG "%s: failed to move %s to init_net: %d\n",
__func__, dev->name, err);
unregister_netdevice(dev);
BUG();
}
}
rtnl_unlock();
Expand Down

0 comments on commit 6bfa714

Please sign in to comment.