Commit f9911db7e2 for bind
commit f9911db7e2eb8f2a33b935299f5eb8e0f356fd70
Author: Petr Špaček <pspacek@isc.org>
Date: Fri Sep 11 11:14:24 2026 +0000
Test redirect zone allow-query-on matching server address
Related: #6407
Assisted-by: Claude:claude-opus-5
diff --git a/bin/tests/system/allow_query_on/ns1/named.conf.j2 b/bin/tests/system/allow_query_on/ns1/named.conf.j2
index 2c7a6e5939..0a4285a86b 100644
--- a/bin/tests/system/allow_query_on/ns1/named.conf.j2
+++ b/bin/tests/system/allow_query_on/ns1/named.conf.j2
@@ -21,6 +21,21 @@ view "vredirect" {
};
};
+view "vredirect2" {
+ match-clients { 10.53.0.5; };
+ zone "." {
+ type primary;
+ file "root.db";
+ };
+
+ zone "." {
+ type redirect;
+ file "redirect.db";
+ allow-query { any; };
+ allow-query-on { 10.53.0.1; };
+ };
+};
+
view "vdlz1" {
match-clients { 10.53.0.2; };
dlz other {
diff --git a/bin/tests/system/allow_query_on/tests_allow_query_on.py b/bin/tests/system/allow_query_on/tests_allow_query_on.py
index 3f0c699757..813018f29e 100644
--- a/bin/tests/system/allow_query_on/tests_allow_query_on.py
+++ b/bin/tests/system/allow_query_on/tests_allow_query_on.py
@@ -20,6 +20,7 @@ import isctest
[
("a.root-servers.nil", "A", "10.53.0.1", NOERROR),
("foo.", "A", "10.53.0.1", NXDOMAIN),
+ ("foo.", "A", "10.53.0.5", NOERROR),
("example.nil", "SOA", "10.53.0.2", REFUSED),
("example.nil", "SOA", "10.53.0.3", REFUSED),
("example.nil", "SOA", "10.53.0.4", NOERROR),