rtnetlink.c (60b7379dc5b1743427b031cca53e30860a38ada6) rtnetlink.c (e0ebde0e131b529fd721b24f62872def5ec3718c)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 1484 unchanged lines hidden (view full) ---

1493
1494 if (tb[IFLA_NET_NS_PID] || tb[IFLA_NET_NS_FD]) {
1495 struct net *net = rtnl_link_get_net(dev_net(dev), tb);
1496 if (IS_ERR(net)) {
1497 err = PTR_ERR(net);
1498 goto errout;
1499 }
1500 if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) {
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Routing netlink socket interface: protocol independent part.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 1484 unchanged lines hidden (view full) ---

1493
1494 if (tb[IFLA_NET_NS_PID] || tb[IFLA_NET_NS_FD]) {
1495 struct net *net = rtnl_link_get_net(dev_net(dev), tb);
1496 if (IS_ERR(net)) {
1497 err = PTR_ERR(net);
1498 goto errout;
1499 }
1500 if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) {
1501 put_net(net);
1501 err = -EPERM;
1502 goto errout;
1503 }
1504 err = dev_change_net_namespace(dev, net, ifname);
1505 put_net(net);
1506 if (err)
1507 goto errout;
1508 status |= DO_SETLINK_MODIFIED;

--- 1569 unchanged lines hidden ---
1502 err = -EPERM;
1503 goto errout;
1504 }
1505 err = dev_change_net_namespace(dev, net, ifname);
1506 put_net(net);
1507 if (err)
1508 goto errout;
1509 status |= DO_SETLINK_MODIFIED;

--- 1569 unchanged lines hidden ---