Today's accomplishment: got sufficiently irritated by Go failing self-tests on stock FreeBSD systems that I finally filed a report on the second issue: https://github.com/golang/go/issues/77411

The first issue on stock FreeBSD is https://github.com/golang/go/issues/70702

It's very obvious that approximately nobody runs Go's all.bash on real FreeBSD systems. At best it is "tested" on Go's builder machines, which are clearly non-standard in multiple ways.

My "Go failing selftests for its net package on FreeBSD" issue¹ turns out to be specific to FreeBSD 15. Evidently there's some networking change that is doing something different from what Go is counting on. If I'm energetic, I can peruse FreeBSD changelogs and stuff.

(It's possible all of the failures involve IPv6 / IPv4 interactions.)

¹ https://github.com/golang/go/issues/77411

net: consistent all.bash failure on stock FreeBSD 15 · Issue #77411 · golang/go

Go version go version go1.25.6 freebsd/amd64 also go version go1.27-devel_d99be5c444 Mon Feb 2 01:42:56 2026 -0800 freebsd Output of go env in your module/workspace: AR='ar' CC='clang' CGO_CFLAGS='...

GitHub

I believe I've found the FreeBSD 15 networking change that breaks Go's net package self-tests, and it's an interesting one¹. As described in the release notes²:

Making a connection to INADDR_ANY, i.e., using it as an alias for localhost, is now disabled by default. This functionality can be re-enabled by setting the net.inet.ip.connect_inaddr_wild sysctl to 1.

I can see the point, even though this is a behavior change.

¹ https://cgit.freebsd.org/src/commit/?id=cd240957d7ba
² https://www.freebsd.org/releases/15.0R/relnotes/#network-general

src - FreeBSD source tree

@cks INADDR_ANY as a *destination* address? The socket API never fails to surprise 😃
@rpluim Yeah this was my surprised face too. Apparently it's traditional behavior to make it the same as connecting to localhost, but said traditional behavior has apparently caused security issues because higher-level APIs often treat a blank host as INADDR_ANY (either explicitly or just implicitly because it's 0, so a zero-initialized host address that's never set is INADDR_ANY).