]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/ipv6/af_inet6.c
net: Allow userns root to control ipv6
[mirror_ubuntu-artful-kernel.git] / net / ipv6 / af_inet6.c
index 7bafc51cda117c1d58270773a0b42818e3addfa9..4b29f6b52c114861dcecb4ea52a4f2600bafca71 100644 (file)
@@ -160,7 +160,8 @@ lookup_protocol:
        }
 
        err = -EPERM;
-       if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
+       if (sock->type == SOCK_RAW && !kern &&
+           !ns_capable(net->user_ns, CAP_NET_RAW))
                goto out_rcu_unlock;
 
        sock->ops = answer->ops;