]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
restore is_zone on return from redirect lookup [RT #37989b]
authorMark Andrews <marka@isc.org>
Wed, 6 May 2015 22:32:14 +0000 (08:32 +1000)
committerMark Andrews <marka@isc.org>
Wed, 6 May 2015 22:32:42 +0000 (08:32 +1000)
(cherry picked from commit 1d405c1412b3a2e5aafb37ea55b332914246349e)

bin/named/query.c
bin/tests/system/redirect/ns4/example.db.in
bin/tests/system/redirect/ns4/named.conf
bin/tests/system/redirect/tests.sh

index 608b24ace935aeec3f0f775e756b587254364d89..0cf832cd43c51fb7d4fffcb3d1c9fe8aef644a1c 100644 (file)
@@ -6529,6 +6529,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                        isc_event_free(ISC_EVENT_PTR(&event));
                } else if (REDIRECT(client)) {
                        result = client->query.redirect.result;
+                       is_zone = ISC_TF(result == DNS_R_NXDOMAIN);
                } else {
                        result = event->result;
                }
index e58564d72ca2ed96955234bf175ae693ded630bf..8aa5c7f954557fbdb910894a97b5c8d0ac926dcc 100644 (file)
@@ -15,5 +15,5 @@
 $TTL 300       ; 5 minutes
 @ IN SOA ns.example.net hostmaster.example.net 0 0 0 0 0
 @       NS     ns4
-ns2    A       10.53.0.4
+ns4    A       10.53.0.4
 a      A       10.53.0.2
index c3bb0ee73826d26b94f4d2f650ab62077168a1a9..4370bee24666dbbea7904d0dc3937772c801ca84 100644 (file)
@@ -51,3 +51,8 @@ zone "." {
        type hint;
        file "root.hint";
 };
+
+zone "example" {
+       type master;
+       file "example.db";
+};
index d0e54497d750e9155739316fad94c55505ab5ecf..7948415f21ae667a96cae84a8cf583cf9a20e5b9 100644 (file)
@@ -486,5 +486,13 @@ n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
+echo "I:checking nxdomain-redirect against authoritative zone ($n)"
+ret=0
+$DIG $DIGOPTS nonexist.example @10.53.0.4 -b 10.53.0.2 a > dig.out.ns4.test$n || ret=1
+grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
 echo "I:exit status: $status"
 exit $status