]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv6/ip6_gre.c
net: Allow userns root to control ipv6
[karo-tx-linux.git] / net / ipv6 / ip6_gre.c
index 823fd64d01360802146be2ab6d0efa07df511c64..867466c96aac053c6bf39c956160171a099ff304 100644 (file)
@@ -1146,7 +1146,7 @@ static int ip6gre_tunnel_ioctl(struct net_device *dev,
        case SIOCADDTUNNEL:
        case SIOCCHGTUNNEL:
                err = -EPERM;
-               if (!capable(CAP_NET_ADMIN))
+               if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
                        goto done;
 
                err = -EFAULT;
@@ -1194,7 +1194,7 @@ static int ip6gre_tunnel_ioctl(struct net_device *dev,
 
        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) {