From: Nimish Jain Date: Sat, 4 Jul 2026 20:33:10 +0000 (-0700) Subject: virt-host-validate-bhyve: replace if_tap check with if_tuntap check X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=097d7dba3657c2a3ee56dbafcab1200a9c6831e1;p=thirdparty%2Flibvirt.git virt-host-validate-bhyve: replace if_tap check with if_tuntap check The tun(4) and tap(4) FreeBSD device drivers were merged into a single tuntap(4) driver back in 2019 and now it's effective for all supported FreeBSD versions. As the virt-host-validate-bhyve still checks for the "if_tap" module, it does not report actual status on the supported FreeBSD releases. Fix by checking for the "if_tuntap" module instead. Signed-off-by: Nimish Jain Reviewed-by: Roman Bogorodskiy --- diff --git a/tools/virt-host-validate-bhyve.c b/tools/virt-host-validate-bhyve.c index d7a409db9d..9bc958445e 100644 --- a/tools/virt-host-validate-bhyve.c +++ b/tools/virt-host-validate-bhyve.c @@ -22,6 +22,7 @@ #include #include +#include #include #include "virt-host-validate-bhyve.h" @@ -62,14 +63,15 @@ int virHostValidateBhyve(void) if (STREQ(stat->name, "vmm.ko")) vmm_loaded = true; - else if (STREQ(stat->name, "if_tap.ko")) - if_tap_loaded = true; else if (STREQ(stat->name, "if_bridge.ko")) if_bridge_loaded = true; else if (STREQ(stat->name, "nmdm.ko")) nmdm_loaded = true; } + if (modfind("if_tuntap") > 0) + if_tap_loaded = true; + MODULE_STATUS_FAIL(vmm, "will not be able to start VMs"); MODULE_STATUS_WARN(if_tap, "networking will not work"); MODULE_STATUS_WARN(if_bridge, "bridged networking will not work");