diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 5a160f4a1ba..d2ba2597c75 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1501,6 +1501,7 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
1501 | char ifname[IFNAMSIZ]; | 1501 | char ifname[IFNAMSIZ]; |
1502 | struct nlattr *tb[IFLA_MAX+1]; | 1502 | struct nlattr *tb[IFLA_MAX+1]; |
1503 | int err; | 1503 | int err; |
1504 | LIST_HEAD(list_kill); | ||
1504 | 1505 | ||
1505 | err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy); | 1506 | err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy); |
1506 | if (err < 0) | 1507 | if (err < 0) |
@@ -1524,7 +1525,9 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
1524 | if (!ops) | 1525 | if (!ops) |
1525 | return -EOPNOTSUPP; | 1526 | return -EOPNOTSUPP; |
1526 | 1527 | ||
1527 | ops->dellink(dev, NULL); | 1528 | ops->dellink(dev, &list_kill); |
1529 | unregister_netdevice_many(&list_kill); | ||
1530 | list_del(&list_kill); | ||
1528 | return 0; | 1531 | return 0; |
1529 | } | 1532 | } |
1530 | 1533 | ||