Am 22.09.26 um 11:40 schrieb Vincent Lefevre:
On 2026-09-21 12:06:03 +0200, Marco Moock wrote:
Am 21.09.26 um 03:00 schrieb Vincent Lefevre:
On 2026-09-20 09:23:48 +0200, Marco Moock wrote:
Am 19.09.26 um 23:40 schrieb Vincent Lefevre:
In any case, I don't see why IPv6 support in the kernel matters
for nscd. I don't see any reason why nscd would do an IPv6
connection; that's useless for name resolving.
nscd is only a cache for libc, it does not do any lookups. The sources
defined in nsswitch.conf do the lookups.
This is incorrect: when nscd is running, nsswitch.conf is not
used at all by the program that calls getaddrinfo! There's only
a connection to "/var/run/nscd/socket".
It still does not do any DNS lookups, it uses the libraries in listed in
nsswitch.conf.
This is still part of the nscd process.
I a quite sure it isn't. But feel free to ask at the libc mailing lists,
there are the people who developed this.
If they handle SERVFAIL improperly, it is not nscd's fault.
I don't see how this is related to IPv6 support in the kernel.
It might, as a system with IPv6 support disabled will most likely never
as for AAAA, which might change the (probably faulty) behavior.
When possible, use standard tools like getent instead of custom
programs or scripts.
getent does *not* work in the same way. In particular, in the test,
I got an exit status 2 in each case while IP addresses were available
in each case (e.g. with getaddrinfo). And no error messages at all.
That's very unhelpful.
Can you give a test case?
Already given, with results, in <[email protected]>
(Sun, 13 Sep 2026 02:35:49 +0200). This is:
#!/bin/sh
getent ahostsv4 $1 || echo "Error: $?"
getent ahostsv6 $1 || echo "Error: $?"
getent ahosts $1 || echo "Error: $?"
I tried that on my machine with google.com as argument, works fine.
$ grep hosts /etc/nsswitch.conf
hosts: files dns
nscd is enabled and working (I searched the cache with the strings command).
But I suspect that you tried with a DNS server that does not return
random SERVFAIL errors.
No, but I do not have one that behaves like that.
This was important for the test.
I do not have such a faulty server to test and do not have access to
your network, so I cannot easily test it.
But if that is the issue, you need to identify the library in nsswitch.conf
that doesn't handle the responses properly and report the bug there.
This does not say how nscd uses nsswitch.conf (/etc/nsswitch.conf
contains "hosts: files dns", so "dns" applies, but this does not say
how name resolving is done). The nscd developers should document that
first.
Please suggest that at sourceware.org, where the programmers of libc
have the repo.
--
Gruß
Marco
Spam bitte an [email protected]