]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorBrian Wellington <source@isc.org>
Mon, 17 Jul 2000 17:15:57 +0000 (17:15 +0000)
committerBrian Wellington <source@isc.org>
Mon, 17 Jul 2000 17:15:57 +0000 (17:15 +0000)
 333. [bug] The resolver incorrectly accepted referrals to
domains that were not parents of the query name,
causing assertion failures.

CHANGES
lib/dns/resolver.c

diff --git a/CHANGES b/CHANGES
index 01060d1f45c36902e92b930ca86154deebd2819a..bad929ef6d0b6b82d5e8ec62cf0bf1a78fae9873 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+ 333.  [bug]           The resolver incorrectly accepted referrals to
+                       domains that were not parents of the query name,
+                       causing assertion failures.
 
        --- 9.0.0rc1 released ---
 
index b6cd8e3629f49bd46ad4a4c7ab9ed0a1955bd003..af9e63248165f7af31a68b9d539254598d504a51 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.137.2.3 2000/07/11 00:06:07 gson Exp $ */
+/* $Id: resolver.c,v 1.137.2.4 2000/07/17 17:15:57 bwelling Exp $ */
 
 #include <config.h>
 
@@ -3142,12 +3142,23 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
         */
        if (!negative_response && ns_name != NULL && oqname == NULL) {
                /*
+                * We already know ns_name is a subdomain of fctx->domain.
                 * If ns_name is equal to fctx->domain, we're not making
                 * progress.  We return DNS_R_FORMERR so that we'll keep
                 * keep trying other servers.
                 */
                if (dns_name_equal(ns_name, &fctx->domain))
                        return (DNS_R_FORMERR);
+
+               /*
+                * If the referral name is not a parent of the query
+                * name, consider the responder insane.  
+                */
+               if (! dns_name_issubdomain(&fctx->name, ns_name)) {
+                       FCTXTRACE("referral to non-parent");
+                       return (DNS_R_FORMERR);
+               }
+
                /*
                 * Mark any additional data related to this rdataset.
                 * It's important that we do this before we change the