mirror of https://gitee.com/openkylin/linux.git
tuntap: fix error return code in tun_set_iff()
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
[ Bug added in linux-3.8 , commit 4008e97f86
("tuntap: fix ambigious multiqueue API") ]
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f11a869d4e
commit
3be8fbab18
|
@ -1594,7 +1594,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
|
|||
|
||||
if (tun->flags & TUN_TAP_MQ &&
|
||||
(tun->numqueues + tun->numdisabled > 1))
|
||||
return err;
|
||||
return -EBUSY;
|
||||
}
|
||||
else {
|
||||
char *name;
|
||||
|
|
Loading…
Reference in New Issue