mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
restore is_zone on return from redirect lookup [RT #37989b]
(cherry picked from commit 1d405c1412b3a2e5aafb37ea55b332914246349e)
This commit is contained in:
parent
6d45011a65
commit
fe76a64294
@ -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));
|
isc_event_free(ISC_EVENT_PTR(&event));
|
||||||
} else if (REDIRECT(client)) {
|
} else if (REDIRECT(client)) {
|
||||||
result = client->query.redirect.result;
|
result = client->query.redirect.result;
|
||||||
|
is_zone = ISC_TF(result == DNS_R_NXDOMAIN);
|
||||||
} else {
|
} else {
|
||||||
result = event->result;
|
result = event->result;
|
||||||
}
|
}
|
||||||
|
@ -15,5 +15,5 @@
|
|||||||
$TTL 300 ; 5 minutes
|
$TTL 300 ; 5 minutes
|
||||||
@ IN SOA ns.example.net hostmaster.example.net 0 0 0 0 0
|
@ IN SOA ns.example.net hostmaster.example.net 0 0 0 0 0
|
||||||
@ NS ns4
|
@ NS ns4
|
||||||
ns2 A 10.53.0.4
|
ns4 A 10.53.0.4
|
||||||
a A 10.53.0.2
|
a A 10.53.0.2
|
||||||
|
@ -51,3 +51,8 @@ zone "." {
|
|||||||
type hint;
|
type hint;
|
||||||
file "root.hint";
|
file "root.hint";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "example" {
|
||||||
|
type master;
|
||||||
|
file "example.db";
|
||||||
|
};
|
||||||
|
@ -486,5 +486,13 @@ n=`expr $n + 1`
|
|||||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||||
status=`expr $status + $ret`
|
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"
|
echo "I:exit status: $status"
|
||||||
exit $status
|
exit $status
|
||||||
|
Loading…
x
Reference in New Issue
Block a user