Name resolution of dot terminated hostnames
Sat May 25 06:39:00 GMT 2019
On Fri, May 24, 2019 at 11:11:37PM +0200, Florian Weimer wrote:
> * Etienne Buira:
> > On Fri, May 24, 2019 at 09:20:23PM +0200, Florian Weimer wrote:
> >> What's your /etc/nsswitch.conf file? What's in /etc/hosts?
> > In nsswitch.conf, the only line regarding hosts is:
> > hosts: file dns
> Presumably this?
> hosts: files dns
> > In hosts, the only non-comment line is:
> > 127.0.0.1 localhost
> > Some nameservers are set in resolv.conf, but the box didn't send any dns
> > query.
> That's odd. I think localhost. queries would have always gone out over
> DNS unless localhost. (with the trailing dot) is listed in /etc/hosts.
> We made quite a few changes to the hosts implementation of nss_files in
> the recent times, but I don't remember removing the trailing-dot
> stripping. It's always been a straight strcasecmp (which is arguably
> wrong for several reasons).
> > The same conf with the older libc versions are resolving dotted form.
> With or without DNS queries?
OK, understood what happened, boxes resolving this did so using DNS
(biten by leniency), box that didn't resolve could not send any dns
query because of exotic ip config. Sorry for the noise.
> > Manpage took from the Linux man-pages project 5.01, currently online. But
> > reading it again, it is clear it is about DNS-based name resolver. Are
> > you aware of any normative reference about this dotted form of names
> > which are not part of a dns hierarchy?
> There is RFC 6761 for special-use names. The trailing dot is mentioned
> in RFC 3986. The behavior regarding trailing dots is varied; one major
> DNS implementation suppressed search list processing with the trailing
> dot, but had a single cache entry for domain with and without the
> trailing dot.
Thank you very much.
More information about the Libc-help