kernel - Fix multiple issues with if_tap and if_tun cloning (2)
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 12 Aug 2020 22:37:07 +0000 (15:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 12 Aug 2020 22:37:07 +0000 (15:37 -0700)
commitab54f4c87eaf45bbf6ad2112d4a8d35b23f3e089
tree954c4fdf2e34edd1c145c77a623ddb66e721cac9
parent98a21dda18d58e69475cb708cac723e459407168
kernel - Fix multiple issues with if_tap and if_tun cloning (2)

* For tap and tun, detect whether created by ifconfig or
  open("/dev/tap"...) etc and set MANUALMAKE flag appropriately.

* When closing a tap or tun interface and MANUALMAKE is not set,
  destroy the device, softc, and interface via if_clone_destroy().
  This fixes another issue where the various bitmaps could get out
  of sync.
sys/net/tap/if_tap.c
sys/net/tun/if_tun.c