This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Speeding up nscd
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 08 Jan 2013 10:15:50 +0100
- Subject: Re: Speeding up nscd
- References: <alpine.LFD.2.02.1212260413530.1646@soupermouf> <CAE2sS1gCrUtd1mEXA6h2iQAo=MFmXNxxRoueSbtwZGZ4-GkK-g@mail.gmail.com> <20121226050907.GA10003@spoyarek.pnq.redhat.com> <alpine.LFD.2.02.1212261049250.1646@soupermouf> <20121226103154.GA7184@domone> <20121226184740.GA18195@machine.or.cz> <87txr8y4sq.fsf@windlord.stanford.edu>
On 12/26/2012 08:47 PM, Russ Allbery wrote:
Also, the original Solaris nscd and I believe early glibc verisons
completely ignored DNS TTLs. [...]
Per Urlich at http://udrepper.livejournal.com/16362.html this bug has been
fixed in glibc since late 2004, but having had that debugging experience,
I have to say that it's... memorable. I suspect that many people just
haven't gotten the message that this was fixed long ago,
I dimly remember subsequent bugs about negative caching and some bad
interactions between A and AAAA lookups.
Looking at the code (and experimenting with Fedora 17 and glibc 2.15),
nscd still turns a NODATA response into a NXDOMAIN response.
Here's a getaddrinfo test without nscd:
error: name lookup failure for enyo.de/80: No address associated with
hostname
But with nscd, I get:
error: name lookup failure for enyo.de/80: Name or service not known
These are the strings returned from gai_strerror, and the constants are
probably EAI_NODATA and EAI_NONAME.
--
Florian Weimer / Red Hat Product Security Team