tuntap: Don't down tap interfaces if LINK0 is set

This commit is contained in:
kevans 2019-05-09 18:54:29 +00:00
parent df7f662050
commit bce105443a

View File

@ -947,7 +947,8 @@ tunclose(struct cdev *dev, int foo, int bar, struct thread *td)
} }
/* For vmnet, we won't do most of the address/route bits */ /* For vmnet, we won't do most of the address/route bits */
if ((tp->tun_flags & TUN_VMNET) != 0) if ((tp->tun_flags & TUN_VMNET) != 0 ||
(l2tun && (ifp->if_flags & IFF_LINK0) != 0))
goto out; goto out;
if (ifp->if_flags & IFF_UP) { if (ifp->if_flags & IFF_UP) {