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>
#include <config.h>
#include <sys/param.h>
+#include <sys/module.h>
#include <sys/linker.h>
#include "virt-host-validate-bhyve.h"
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");