net: Allow userns root to control ipv6
[deliverable/linux.git] / net / ipv6 / route.c
index c6215e2b9d7f97cca35ee511b00410ea36225444..a86b65599328aa9d47e47136442f1a2f614df074 100644 (file)
@@ -2036,7 +2036,7 @@ int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg)
        switch(cmd) {
        case SIOCADDRT:         /* Add a route */
        case SIOCDELRT:         /* Delete a route */
-               if (!capable(CAP_NET_ADMIN))
+               if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
                        return -EPERM;
                err = copy_from_user(&rtmsg, arg,
                                     sizeof(struct in6_rtmsg));
This page took 0.032309 seconds and 5 git commands to generate.