Brian Buhrow writes:
- hello. It appears that gethostbyname(3) in NetBSD-5.2 and 6.1.x is
- broken if the name you're trying to fetch is listed in /etc/hosts and
- nowhere else. The problem appears to be with this change:
I'm unable to reproduce on "6.1_STABLE amd64".
One thing you've not provided is your nsswitch.conf file, it
controls how getent(1) behaves.
>From my test session:
egsner-> grep sillyhost.cirr.com /etc/hosts
192.168.10.1 sillyhost.cirr.com sillyhost
egsner-> host sillyhost.cirr.com
Host sillyhost.cirr.com not found: 3(NXDOMAIN)
egsner-> getent hosts sillyhost.cirr.com
192.168.10.1 sillyhost.cirr.com sillyhost
egsner-> grep host /etc/nsswitch.con
hosts: files dns
# hosts: dns, files, nis, mdnsd, multicast_dns
If your nsswitch has "dns files", you may want a "[notfound=continue]"
clause between "dns" and "files" (although that is supposed to
be the default.)
I might postulate your configuration has an nsswitch.conf file
with only "dns" in it?
--
Eric Schnoebelen [email protected] http://www.cirr.com