]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
patch applied itself incorrectly ; fixed
authorMichael Graff <mgraff@isc.org>
Wed, 17 Sep 2003 05:56:16 +0000 (05:56 +0000)
committerMichael Graff <mgraff@isc.org>
Wed, 17 Sep 2003 05:56:16 +0000 (05:56 +0000)
lib/dns/resolver.c

index 8e0ba110056be1a6f8164d3c722a60e0aaa848e2..aad71da0f33df6892f05de08abbebf240ea48ac7 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: resolver.c,v 1.218.2.12.4.4.2.1 2003/09/17 05:40:39 explorer Exp $ */
+/* $Id: resolver.c,v 1.218.2.12.4.4.2.2 2003/09/17 05:56:16 explorer Exp $ */
 
 #include <config.h>
 
@@ -4422,6 +4422,24 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                goto done;
        }
 
+       /*
+        * Enforce delegations only zones like NET and COM.
+        */
+       if (dns_view_isdelegationonly(fctx->res->view, &fctx->domain) &&
+           !dns_name_equal(&fctx->domain, &fctx->name) &&
+           fix_mustbedelegationornxdomain(message, &fctx->domain)) {
+               char namebuf[DNS_NAME_FORMATSIZE];
+               char domainbuf[DNS_NAME_FORMATSIZE];
+
+               dns_name_format(&fctx->name, namebuf, sizeof(namebuf));
+               dns_name_format(&fctx->domain, domainbuf, sizeof(domainbuf));
+
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DELEGATION_ONLY,
+                            DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
+                            "enforced delegation-only for '%s' (%s)",
+                            domainbuf, namebuf);
+       }
+
        /*
         * Did we get any answers?
         */
@@ -4475,24 +4493,6 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
                goto done;
        }
 
-       /*
-        * Enforce delegations only zones like NET and COM.
-        */
-       if (dns_view_isdelegationonly(fctx->res->view, &fctx->domain) &&
-           !dns_name_equal(&fctx->domain, &fctx->name) &&
-           fix_mustbedelegationornxdomain(message, &fctx->domain)) {
-               char namebuf[DNS_NAME_FORMATSIZE];
-               char domainbuf[DNS_NAME_FORMATSIZE];
-
-               dns_name_format(&fctx->name, namebuf, sizeof(namebuf));
-               dns_name_format(&fctx->domain, domainbuf, sizeof(domainbuf));
-
-               isc_log_write(dns_lctx, DNS_LOGCATEGORY_DELEGATION_ONLY,
-                            DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
-                            "enforced delegation-only for '%s' (%s)",
-                            domainbuf, namebuf);
-       }
-
        /*
         * Follow A6 and other additional section data chains.
         */