Re: How does host lookup work
On Tuesday 24 Mar 2009, Alex Samad wrote:
> On Tue, Mar 24, 2009 at 06:40:41PM +0000, Alan Chandler wrote:
> >
> > I still do not understand [NOTFOUND=return].
> >
> > My reading of the manual is that it stops a failed lookup moving on
> > to the subsequent entries. How do the dns entry and the mdns4
> > entry ever get used?
>
> from man nsswitch.conf, it say about the same thing, so if you have
> mdns (or mdns_minimal) installed it takes over all dns resolution for
> you
>
> success - means you have resolution and returns - goes no further
> notfound - means mds worked but did not find a record and thus
> returns unavail - this is the only time it will make it past
>
> > [I know the DO get used, so my understanding is obviously WRONG. I
> > want to find out what the correct interpretation of that is]
>
> from the README.html
>
> libnss_mdns{4,6,}_minimal.so (new in version 0.8) is mostly identical
> to the
> versions without _minimal. However, they differ in one way. The
> minimal versions
> will always deny to resolve host names that don't end in .local or
> addresses that
> aren't in the range 169.254.x.x (the range used by
> IPV4LL/APIPA/RFC3927.)
I think I understand now - Thank you. I think that the words written in
the README.html document are slightly confusing.
I assume what it really means is that mdns4_minimal returns UNAVAIL when
the domain being asked for is NOT in .local domain (or in ip range
169.254.x.x) rather than NOTFOUND - so in the case of a lookup of a
domain name not in local, with the nsswitch.conf line as it is now
configured goes on to try the dns (and finally a full mdns4).
On the otherhand if you attempt to look up xxx.local and its not a valid
name for .local mdns4_minimal returns NOTFOUND, and thus prevents
further lookup in the dns.
--
Alan Chandler
http://www.chandlerfamily.org.uk
Reply to: