]> Git Repo - linux.git/blobdiff - net/ipv4/ip_gre.c
net: Allow userns root to control ipv4
[linux.git] / net / ipv4 / ip_gre.c
index 127f2a1e67f58fabfa5bf31eb51d9dd3a4845e6c..a85ae2f7a21cb15502bd69e9c63a1ec29020fa40 100644 (file)
@@ -1064,7 +1064,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
        case SIOCADDTUNNEL:
        case SIOCCHGTUNNEL:
                err = -EPERM;
-               if (!capable(CAP_NET_ADMIN))
+               if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
                        goto done;
 
                err = -EFAULT;
@@ -1139,7 +1139,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
 
        case SIOCDELTUNNEL:
                err = -EPERM;
-               if (!capable(CAP_NET_ADMIN))
+               if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
                        goto done;
 
                if (dev == ign->fb_tunnel_dev) {
This page took 0.031709 seconds and 4 git commands to generate.