While FreeBSD’s WiFi stack has been improving steadily, it still lags behind Linux. Wifibox bridges that gap by deploying a Linux guest to drive a wireless card on the FreeBSD host via PCI pass-through — and it works remarkably well.
That said, I ran into a connectivity issue: connections to hosts resolving to both IPv4 and IPv6 addresses were silently failing on the IPv6 path. The culprit was IPv6 address selection.
Wifibox relies on ULA (Unique Local Addresses, fd00::/64) for its internal IPv6 routing. The problem is that FreeBSD’s default ip6addrctl policy doesn’t allow routing to a global unicast address (GUA) when the source address is a ULA — so the connection attempt would fail or fall back unexpectedly.
The fix is to add a policy entry for the ULA prefix and enable the custom policy in /etc/rc.conf:
ip6addrctl_policy="AUTO"
Then in /etc/ip6addrctl.conf:
# enable selecting GUA destination with fd00::/64 as source address fd00::/64 37 1 # default automatic policy (IPv6 preferred) ::1/128 50 0 ::/0 40 1 ::ffff:0:0/96 35 4 2002::/16 30 2 2001::/32 5 5 fc00::/7 3 13 ::/96 1 3 fec0::/10 1 11 3ffe::/16 1 12
This is a direct follow-up to my previous post IPv6 address selection and cross-site ULAs, which covers the underlying mechanics in more detail.