aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/dcb/dcbnl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index b07c75d37e91..1b588e23cf80 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -1665,9 +1665,6 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
1665 if ((nlh->nlmsg_type == RTM_SETDCB) && !capable(CAP_NET_ADMIN)) 1665 if ((nlh->nlmsg_type == RTM_SETDCB) && !capable(CAP_NET_ADMIN))
1666 return -EPERM; 1666 return -EPERM;
1667 1667
1668 if (!net_eq(net, &init_net))
1669 return -EINVAL;
1670
1671 ret = nlmsg_parse(nlh, sizeof(*dcb), tb, DCB_ATTR_MAX, 1668 ret = nlmsg_parse(nlh, sizeof(*dcb), tb, DCB_ATTR_MAX,
1672 dcbnl_rtnl_policy); 1669 dcbnl_rtnl_policy);
1673 if (ret < 0) 1670 if (ret < 0)
@@ -1684,7 +1681,7 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
1684 if (!tb[DCB_ATTR_IFNAME]) 1681 if (!tb[DCB_ATTR_IFNAME])
1685 return -EINVAL; 1682 return -EINVAL;
1686 1683
1687 netdev = dev_get_by_name(&init_net, nla_data(tb[DCB_ATTR_IFNAME])); 1684 netdev = dev_get_by_name(net, nla_data(tb[DCB_ATTR_IFNAME]));
1688 if (!netdev) 1685 if (!netdev)
1689 return -ENODEV; 1686 return -ENODEV;
1690 1687
@@ -1708,7 +1705,7 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
1708 1705
1709 nlmsg_end(reply_skb, reply_nlh); 1706 nlmsg_end(reply_skb, reply_nlh);
1710 1707
1711 ret = rtnl_unicast(reply_skb, &init_net, portid); 1708 ret = rtnl_unicast(reply_skb, net, portid);
1712out: 1709out:
1713 dev_put(netdev); 1710 dev_put(netdev);
1714 return ret; 1711 return ret;