NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/55799: nsswitch.conf(5) man page

You're right! It didn't work just because the .local suffix is required but not automatically added to host names when calling mdnsd.
If I set "domain local" in /etc/resolv.conf, it works as documented.
Thanks for the clarification.

On 09/11/2020 16:05, Michael van Elst wrote:
The following reply was made to PR bin/55799; it has been noted by GNATS.

From: (Michael van Elst)
Subject: Re: bin/55799: nsswitch.conf(5) man page 
Date: Mon, 9 Nov 2020 15:02:40 -0000 (UTC) writes:
 >The nsswitch.conf(5) man page incorrectly specifies:
 >mdnsd            Use mdnsd(8) for “hosts” lookups
 >instead of:
 >mdns             Use mdnsd(8) for “hosts” lookups
 The source is used to load the corresponding NSS shared library.
 mdnsd          ->
 multicast_dns  ->
 There is none for 'mdns' and since it doesn't reference a builtin source
 it is skipped.
 >Modify /etc/nsswitch.conf as follows:
 >hosts:          files mdnsd dns
 >Then ping => ping does not respond for a long time.
 >Then ping a machine on your local network => same delay (if your router acts as a DNS server) or error (otherwise).
 The nss_mdnsd module will try to contact a locally running mdnsd. Eventually
 it times out and dns is used.
 You need to start mdnsd. And then you would use something like 'files mdnsd'
 or 'files multicast_dns dns' in nsswitch.conf.
 >hosts:          files mdns dns
 >Then ping => ping responds instantly.
 >Then ping a machine on your local network => ping also responds instantly.
 In both cases, you only use dns. The libc code doesn't print warnings
 when it doesn't find a module as builtin sources don't have a module
 and would also generate warnings in this place.
 		if (snprintf(buf, sizeof(buf), "",,
 		    NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf))
 			goto out;
 		mod.handle = dlopen(buf, RTLD_LOCAL | RTLD_LAZY);
 		if (mod.handle == NULL) {
 #ifdef _NSS_DEBUG
 			 * This gets pretty annoying, since the built-in
 			 * sources are not yet modules.
 			/* XXX log some error? */
 			goto out;
                                 Michael van Elst
                                 "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index