]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virt-host-validate-bhyve: replace if_tap check with if_tuntap check
authorNimish Jain <unauthorizen@gmail.com>
Sat, 4 Jul 2026 20:33:10 +0000 (13:33 -0700)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 8 Jul 2026 14:49:41 +0000 (16:49 +0200)
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 <unauthorizen@gmail.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
tools/virt-host-validate-bhyve.c

index d7a409db9dffdae78fc24edb73fb39d99e3ae4de..9bc958445ea9ab7c13de83c3e40116f259b4e66b 100644 (file)
@@ -22,6 +22,7 @@
 #include <config.h>
 
 #include <sys/param.h>
+#include <sys/module.h>
 #include <sys/linker.h>
 
 #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");