On 22/08/17 10:20 PM, David C. Rankin wrote:
There have been a number of changes in gethostbyname, (though I don't recall the details) where this exact issue of local resolution and gethostbyname, dnsdomainname were not being handled adequately. I do recall the solution being a proper entry in /etc/hosts to provide local hostname/domain resolution.
I've not seen mentions so far in this thread of the setting in /etc/nsswitch.conf RTFM The Name Service Switch (NSS) configuration file, /etc/nsswitch.conf, is used by the GNU C Library to determine the sources from which to obtain name-service information in a range of categories, and in what order. ... hosts: Host names and numbers, used by gethostbyname(3) and related functions. My entry reads: hosts: files mdns_minimal [NOTFOUND=return] dns Which means that it consults /etc/hosts first. I am also using 'dnsmasq'. Actually that is a very smart program, it not only reads in /etc/hosts so I _could_ omit 'files" from my nsswitch.conf entry, but it also handles DHCP as well and makes sure that when a DHCP IP address is handed out there is a corresponding DNS entry for it :-) Nice, eh? See also http://blog.uguu.waw.pl/2015/05/21/mdns-netbsd-linux-osx/ Do note that in https://www.tinc-vpn.org/examples/zeroconf-ip-and-dns/ it says This will allow your computer to resolve mDNS hostnames which addresses in the form of "something.local". and later Note that you can use a different top level domain than .local, but in such case you need to use mdns entry instead of mdns_minimal. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org