diff options
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e21bdb92565d..67ac9f8d1976 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2413,7 +2413,7 @@ int addrconf_add_ifaddr(struct net *net, void __user *arg) | |||
2413 | struct in6_ifreq ireq; | 2413 | struct in6_ifreq ireq; |
2414 | int err; | 2414 | int err; |
2415 | 2415 | ||
2416 | if (!capable(CAP_NET_ADMIN)) | 2416 | if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) |
2417 | return -EPERM; | 2417 | return -EPERM; |
2418 | 2418 | ||
2419 | if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq))) | 2419 | if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq))) |
@@ -2432,7 +2432,7 @@ int addrconf_del_ifaddr(struct net *net, void __user *arg) | |||
2432 | struct in6_ifreq ireq; | 2432 | struct in6_ifreq ireq; |
2433 | int err; | 2433 | int err; |
2434 | 2434 | ||
2435 | if (!capable(CAP_NET_ADMIN)) | 2435 | if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) |
2436 | return -EPERM; | 2436 | return -EPERM; |
2437 | 2437 | ||
2438 | if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq))) | 2438 | if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq))) |