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
The following reply was made to PR bin/55799; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/55799: nsswitch.conf(5) man page
Date: Mon, 9 Nov 2020 15:02:40 -0000 (UTC)
20.100%defert.com@localhost 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 -> nss_mdnsd.so
multicast_dns -> nss_multicast_dns.so
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 www.netbsd.org => 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 www.netbsd.org => 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_%s.so.%d", mod.name,
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? */
#endif
goto out;
}
Greetings,
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index