diff options
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index f042b0373e5d..89776c592151 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -1585,6 +1585,10 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) | |||
1585 | else | 1585 | else |
1586 | return -EINVAL; | 1586 | return -EINVAL; |
1587 | 1587 | ||
1588 | if (!!(ifr->ifr_flags & IFF_MULTI_QUEUE) != | ||
1589 | !!(tun->flags & TUN_TAP_MQ)) | ||
1590 | return -EINVAL; | ||
1591 | |||
1588 | if (tun_not_capable(tun)) | 1592 | if (tun_not_capable(tun)) |
1589 | return -EPERM; | 1593 | return -EPERM; |
1590 | err = security_tun_dev_open(tun->security); | 1594 | err = security_tun_dev_open(tun->security); |