]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Fri, 2 Feb 2001 01:32:25 +0000 (01:32 +0000)
committerAndreas Gustafsson <source@isc.org>
Fri, 2 Feb 2001 01:32:25 +0000 (01:32 +0000)
 723.   [bug]           Referrals whose NS RRs had a 0 TTL caused the resolver
                        to return DNS_R_SERVFAIL. [RT #783]

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 55b92aa19cd80babbcafe0a3457dbb11a7a60015..4861d66cfa1d91f2b813adeedc888ad9265b969c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+
+ 723.  [bug]           Referrals whose NS RRs had a 0 TTL caused the resolver
+                       to return DNS_R_SERVFAIL. [RT #783]
+
  720.  [bug]           Server could enter infinite loop in
                        dispatch.c:do_cancel(). [RT #743]
 
index 194d0e1bdb8017e1cfc04ac8bb4286ad2b2125f2..b4ddcee1c5c05985c91cd716222d5d6ce40f64d9 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.187.2.4 2001/01/11 20:06:57 bwelling Exp $ */
+/* $Id: resolver.c,v 1.187.2.5 2001/02/02 01:32:25 gson Exp $ */
 
 #include <config.h>
 
@@ -3470,6 +3470,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.
                 *