Add DragonFly BSD support and improve FreeBSD support
- Support DragonFly BSD for TUN creation and destroy in the same way as FreeBSD.
- No need to load the
if_tunkernel module, because theifconfig(8)utility on FreeBSD and DragonFly BSD will auto load it if necessary. This additionally improves FreeBSD support for FreeBSD >=13 because theif_tapandif_tunmodules have been merged intoif_tuntap. - Fix TUN address deletion syntax.
- Use
[[:space:]]instead of\sto support BSD's awk(1). - Improve the determination of default route.
Signed-off-by: Aaron LI aly@aaronly.me
Edited by Aaron LI