Page MenuHomeFreeBSD

libc/resolv: Switch default to loopback address
ClosedPublic

Authored by des on Jan 31 2026, 12:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 5, 2:15 AM
Unknown Object (File)
Thu, Mar 12, 10:29 PM
Unknown Object (File)
Wed, Mar 11, 2:23 PM
Unknown Object (File)
Mar 6 2026, 12:01 PM
Unknown Object (File)
Feb 27 2026, 3:58 AM
Unknown Object (File)
Feb 25 2026, 10:58 AM
Unknown Object (File)
Feb 18 2026, 5:53 PM
Unknown Object (File)
Feb 17 2026, 8:15 PM
Subscribers

Details

Summary

If no resolver configuration was found, we would fall back to INADDR_ANY
and IN6ADDR_ANY. This made sense when it was first written thirty or
forty years ago but not today, especially since connecting to INADDR_ANY
or IN6ADDR_ANY is no longer supported. Switch to the loopback address
and simplify the code.

Note that (as the pre-existing comment in the code states) running
without a resolver configuration is not really supported. Still, if
we're going to have a hardcoded fallback, it might as well work.

PR: 291790
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70284
Build 67167: arc lint + arc unit