aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 8f9d3b38a44b..9475f3e624a8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4852,6 +4852,12 @@ static void __net_exit default_device_exit(struct net *net)
4852 if (dev->features & NETIF_F_NETNS_LOCAL) 4852 if (dev->features & NETIF_F_NETNS_LOCAL)
4853 continue; 4853 continue;
4854 4854
4855 /* Delete virtual devices */
4856 if (dev->rtnl_link_ops && dev->rtnl_link_ops->dellink) {
4857 dev->rtnl_link_ops->dellink(dev);
4858 continue;
4859 }
4860
4855 /* Push remaing network devices to init_net */ 4861 /* Push remaing network devices to init_net */
4856 snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex); 4862 snprintf(fb_name, IFNAMSIZ, "dev%d", dev->ifindex);
4857 err = dev_change_net_namespace(dev, &init_net, fb_name); 4863 err = dev_change_net_namespace(dev, &init_net, fb_name);