aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/tun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index a1ed2d983740..6c62d5c88268 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -490,6 +490,9 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr)
490 490
491 err = -EINVAL; 491 err = -EINVAL;
492 492
493 if (!capable(CAP_NET_ADMIN))
494 return -EPERM;
495
493 /* Set dev type */ 496 /* Set dev type */
494 if (ifr->ifr_flags & IFF_TUN) { 497 if (ifr->ifr_flags & IFF_TUN) {
495 /* TUN device */ 498 /* TUN device */