Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2007 11:33:48 +0800
From:      Erich Dollansky <oceanare@pacific.net.sg>
To:        d@delphij.net
Cc:        freebsd-net <freebsd-net@freebsd.org>
Subject:   Re: [nsdispatch] hosts(5) does not override DNS lookup?
Message-ID:  <46E8AF9C.3060107@pacific.net.sg>
In-Reply-To: <46E8AB2E.7020602@delphij.net>
References:  <46E8AB2E.7020602@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I have had the same behaviour.

LI Xin wrote:
> 
> Recently one of our local user has found that he was unable to use
> hosts(5) to override "localhost" lookup that happens in DNS, while doing
> rpc_clnt_create.  A preliminary investigate of this seems to be related
> to nsdispatch, by replacing:
> 
> hosts: files dns
> 
> With:
> 
> hosts: files
> 
> in /etc/nsswitch.conf, it does not query DNS.
> 
> Before diving into NSSWITCH code, I'd like to know if this is expected
> behavior?  Say, when we have a match in hosts(5), should we even bother
> to query DNS if configured hosts: files dns?
> 
After getting a hint on the list, I found out that some strange 
characters in hosts made the file useless. After retyping hosts, hosts 
was accepted again.

I was not able to find out what character it was. I expected CR, but it 
was not the case.

Just retype or copy it from a working system.

Erich



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46E8AF9C.3060107>