On Mon, Sep 21, 2026 at 10:51:58AM +0200, Vincent Lefevre wrote:
> On 2026-09-21 07:42:04 +0200, [email protected] wrote:
> > On Mon, Sep 21, 2026 at 02:50:09AM +0200, Vincent Lefevre wrote:
> > > 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".
> > 
> > I think Marco meant that nscd itself looks into nsswitch (which
> > it does, at least the man page states it). Its clients (i.e.
> > the libc in the applications) consequently doesn't have to.
> 
> Marco said "it does not do any lookups". If nscd looks into
> nsswitch.conf, then it will do the lookup.

I think we are talking past each other: Marco's statement
(still in the quote above) is right "nscd is a cache" and
delegates the lookups to the sources in nsswitch (as libc
would do without nscd). Your statement "when nscd is running,
nsswitch is not used by the program" is /also/ right, but
they don't contradict each other -- because then it is
nscd who's using nsswitch on behalf of the program!

So it is your "This is incorrect..." which is incorrect.

I'm not chiming in out of OCD or anything, but because I
think this is making an already confusing topic even more
confusing.

> In any case, my remark is still:
> Why would nscd do any IPv6 connection?
> (i.e., why would nscd depend on IPv6 support in the kernel?)

I think that is not the point. It is not the question which way
nscd gets at the DNS records (via IPv4 vs IPv6) but rather which
kind of records it gets (A vs AAAA). Or, more precisely, which
ones are preferred by the application.

Of course, the cache itself, as you found out, makes things more
interesting, especially when it caches intermittent DNS lookup
failures.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature

Reply via email to