Page MenuHomeFreeBSD

libc/resolv: Switch default to loopback address
ClosedPublic

Authored by des on Sat, Jan 31, 12:00 PM.
Tags
None
Referenced Files
F145180103: D55011.id170846.diff
Mon, Feb 16, 8:11 PM
Unknown Object (File)
Mon, Feb 16, 12:23 PM
Unknown Object (File)
Sat, Feb 14, 9:13 PM
Unknown Object (File)
Sun, Feb 8, 8:18 AM
Unknown Object (File)
Sat, Feb 7, 10:17 AM
Unknown Object (File)
Sun, Feb 1, 9:14 PM
Unknown Object (File)
Sun, Feb 1, 11:50 AM
Unknown Object (File)
Sun, Feb 1, 10:12 AM
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 70283
Build 67166: arc lint + arc unit