if_tun: Support module load and unload
authorAaron LI <aly@aaronly.me>
Sun, 8 Jul 2018 01:43:12 +0000 (09:43 +0800)
committerAaron LI <aly@aaronly.me>
Thu, 19 Jul 2018 07:09:47 +0000 (15:09 +0800)
commite9ff9cbbb2f67488b832b985884330539eb236cf
tree2a07b3f2ac05ec8383fcb09a0ff18a11e9e393ae
parent860e305a4e6cc899b09479646ac55eaca5b142f1
if_tun: Support module load and unload

Track the created tun devices in a list, and record the number of opened
tun devices.  Destroy all tun devices when unloading the module.

Mainly based on if_tap.
share/man/man4/tun.4
sys/net/tun/if_tun.c
sys/net/tun/if_tunvar.h