Referrals whose NS RRs had a 0 TTL caused the resolver to return

DNS_R_SERVFAIL.  [RT #783]
This commit is contained in:
Bob Halley 2001-02-02 00:10:26 +00:00
parent 7bc8deb30f
commit d6b3d06db7
2 changed files with 14 additions and 2 deletions

View file

@ -1,4 +1,7 @@
722. [func] Allow incrememtal loads to be canceled.
723. [bug] Referrals whose NS RRs had a 0 TTL caused the resolver
to return DNS_R_SERVFAIL. [RT #783]
722. [func] Allow incremental loads to be canceled.
721. [cleanup] Load manager and dns_master_loadfilequota() are no
more.

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.196 2001/01/19 22:22:16 bwelling Exp $ */
/* $Id: resolver.c,v 1.197 2001/02/02 00:10:26 halley Exp $ */
#include <config.h>
@ -3495,6 +3495,15 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
(void)dns_rdataset_additionaldata(ns_rdataset, check_related,
fctx);
fctx->attributes &= ~FCTX_ATTR_GLUING;
/*
* NS rdatasets with 0 TTL cause problems.
* dns_view_findzonecut() will not find them when we
* try to follow the referral, and we'll SERVFAIL
* because the best nameservers are now above QDOMAIN.
* We force the TTL to 1 second to prevent this.
*/
if (ns_rdataset->ttl == 0)
ns_rdataset->ttl = 1;
/*
* Set the current query domain to the referral name.
*