Skip to content

Conversation

@kimshrier
Copy link
Contributor

@kimshrier kimshrier commented Dec 14, 2025

update unit tests to deal with net.inet.ip.connect_inaddr_wild on FreeBSD

This is a potential fix for issue 25935.

It checks for the existence of the net.inet.ip.connect_inaddr_wild sysctl and if it exists and if it is zero, it skips checking for the IPv6 socket listening for connections.

Prior to FreeBSD 14, there was no sysctl named net.inet.ip.connect_inaddr_wild and opening a socket on localhost would open both an IPv4 and IPv6 socket. In FreeBSD 14, this sysctl was introduced with a default value or 1. This retained the behavior of FreeBSD 13 and earlier. With the release of FreeBSD 15, this value now defaults to 0 which means that opening a socket on localhost only opens the IPv4 socket. There are more details in the related issue.

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for investigating, and keeping these tests pass on the latest FreeBSD (even if skipped).

What do you think of the idea, of detecting it also at startup, in the implementation code for vweb and veb, and then showing a message about it (searching for params.show_startup_message can show where)?

@spytheman spytheman merged commit 050a023 into vlang:master Dec 15, 2025
75 of 76 checks passed
@kimshrier
Copy link
Contributor Author

Adding a message at startup time sounds like a good idea. I'll look at it if you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants