Re: Caching SERVFAIL?
Mark Johnson <[email protected]>
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 24, 2009 at 6:41 PM, Matthew Dempsky <[email protected]> wrote: > dnscache before djbdns-1.05 used to cache SRVFAIL responses (with > support for actually caching them as SRVFAIL, rather than turning them > into NXDOMAIN). Dan specifically removed this from djbdns-1.04, with > a CHANGES comment "dnscache no longer caches SERVFAIL. per-ip is > obviously the way to go." Relevant bits from CHANGES from djbdns-1.05: 20010106 version: djbdns 1.03. 20010113 <snip> ui: dnscache no longer caches SERVFAIL. per-ip is obviously the way to go. <snip> <snip> 20010121 version: djbdns 1.04. Here's the relevant bits from a diff between djbdns-1.03 and djbdns-1.04: diff -r djbdns-1.03/log.c djbdns-1.04/log.c 178,183d177 < void log_cachedservfail(const char *dn) < { < string("cached servfail "); name(dn); < line(); < } < diff -r djbdns-1.03/log.h djbdns-1.04/log.h 18d17 < extern void log_cachedservfail(const char *); diff -r djbdns-1.03/query.c djbdns-1.04/query.c 200d199 < cachegeneric(DNS_T_AXFR,z->name[z->level],"",0,60); 254,260d252 < byte_copy(key,2,DNS_T_AXFR); < cached = cache_get(key,dlen + 2,&cachedlen,&ttl); < if (cached) { < log_cachedservfail(d); < goto SERVFAIL; < } < Hi Jos! http://marc.info/?l=djbdns&m=108560819606350&w=2 Questions, Queries, Posers: Why the change? What's with the DNS_T_AXFR? I'll take a stab at the former and guess maybe that the downside from a cached SERVFAIL (bounced mail, etc) was determined to be worse than the performance benefit of not repeatedly trying to contact horked servers? What do other recursive resolvers do? I'll go stare at the code eventually, but if anybody knows, save me the trouble...