diff options
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 589f0ca668d6..94622e5fb936 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -874,6 +874,8 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) | |||
874 | 874 | ||
875 | dev = __dev_get_by_name(net, ifr->ifr_name); | 875 | dev = __dev_get_by_name(net, ifr->ifr_name); |
876 | if (dev) { | 876 | if (dev) { |
877 | if (ifr->ifr_flags & IFF_TUN_EXCL) | ||
878 | return -EBUSY; | ||
877 | if ((ifr->ifr_flags & IFF_TUN) && dev->netdev_ops == &tun_netdev_ops) | 879 | if ((ifr->ifr_flags & IFF_TUN) && dev->netdev_ops == &tun_netdev_ops) |
878 | tun = netdev_priv(dev); | 880 | tun = netdev_priv(dev); |
879 | else if ((ifr->ifr_flags & IFF_TAP) && dev->netdev_ops == &tap_netdev_ops) | 881 | else if ((ifr->ifr_flags & IFF_TAP) && dev->netdev_ops == &tap_netdev_ops) |