On Fri, Jan 26, 2018 at 08:22:18AM -0800, 神明達哉 wrote: > Hmm, that's different from my interpretation of the draft. According > to my usual interpretation of IETF docs, I would interpret these from > Section 3: > > 3. Name resolution APIs and libraries MUST recognize localhost names > as special, and MUST always return an appropriate IP loopback > address for IPv4 and IPv6 address queries and negative responses > for all other query types. Name resolution APIs MUST NOT send > queries for localhost names to their configured recursive DNS > server(s). > > As for application software, name resolution APIs and libraries > MUST NOT use a searchlist to resolve a localhost name. > > 4. (Caching) recursive DNS servers MUST respond to queries for > localhost names with NXDOMAIN. > > 5. Authoritative DNS servers MUST respond to queries for localhost > names with NXDOMAIN. > > as these are requirements without a user-configurable knob. If the > actual intent was just to specify the default behavior with a > configurable knob, I'd expect SHOULD-variants are used in cases like > these.
Exactly. The MUST language is asking implementations to remove support for the existing knobs, which should stay. I just talked to Christos Zoulas of NetBSD, as he's also the current (or at least recent) upstream maintainer of libresolv. He not only supports my view that the MUST is extraneous, but indeed also has localhost (forward) and loopback (reverse) zones configured on his own machines. This practice is reasonably widespread. I should also note that there is some confusion in recent messages between what is a stub (DNS) resolver and higher-level name resolution facilities such as getaddrinfo(3). Yes, getaddrinfo(3) and friends on modern Unix-like systems use nsswitch and typically consult the /etc/hosts file before using DNS, but that's not what this draft is about. It specifically describes "stub-resolver" behaviour, not getaddrinfo() behaviour. The stub resolver is libresolv, and does not presently special-case "localhost". If the intent is to require special handling of "localhost" in the platform's name to address lookup library (getaddrinfo(), gethostbyname(), ...), then the draft should say so, instead of talking about stub resolvers, which are only the DNS component of the platform's hostname resolution stack. -- Viktor. _______________________________________________ DNSOP mailing list DNSOP@ietf.org https://www.ietf.org/mailman/listinfo/dnsop