diff options
Diffstat (limited to 'net/ipv4/devinet.c')
| -rw-r--r-- | net/ipv4/devinet.c | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 41709353891..259622a5e69 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -730,7 +730,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)  	case SIOCSIFFLAGS:  		ret = -EPERM; -		if (!capable(CAP_NET_ADMIN)) +		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))  			goto out;  		break;  	case SIOCSIFADDR:	/* Set interface address (and family) */ @@ -738,7 +738,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)  	case SIOCSIFDSTADDR:	/* Set the destination address */  	case SIOCSIFNETMASK: 	/* Set the netmask for the interface */  		ret = -EPERM; -		if (!capable(CAP_NET_ADMIN)) +		if (!ns_capable(net->user_ns, CAP_NET_ADMIN))  			goto out;  		ret = -EINVAL;  		if (sin->sin_family != AF_INET)  |