From 200abb43c07916fe0fa59d89312e58a2b137ef49 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Tue, 22 Oct 2019 00:18:16 +0000 Subject: [PATCH] tuntap(4): properly declare if_tun and if_tap modules Simply adding MODULE_VERSION does not do the trick, because the modules haven't been declared. This should actually fix modfind/kldstat, which r351229 aimed and failed to do. This should make vm-bhyve do the right thing again when using the ports version, rather than the latest version not in ports. MFC after: 3 days --- sys/net/if_tuntap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c index 8cefa9d17f90..49120374cc43 100644 --- a/sys/net/if_tuntap.c +++ b/sys/net/if_tuntap.c @@ -783,9 +783,15 @@ static moduledata_t tuntap_mod = { 0 }; +/* We'll only ever have these two, so no need for a macro. */ +static moduledata_t tun_mod = { "if_tun", NULL, 0 }; +static moduledata_t tap_mod = { "if_tap", NULL, 0 }; + DECLARE_MODULE(if_tuntap, tuntap_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(if_tuntap, 1); +DECLARE_MODULE(if_tun, tun_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(if_tun, 1); +DECLARE_MODULE(if_tap, tap_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(if_tap, 1); static int