Commit 0b138cd487 for bind
commit 0b138cd487ab7444459c2111efb9848501fe9a8b
Author: Evan Hunt <each@isc.org>
Date: Mon Oct 12 16:43:32 2026 -0700
Restore large-referral test
The "resolver" system test includes a test for handling a very large
referral to a non-responsive server. When the ans3 server was rewritten
to Python in commit 5004d278e49d84bd80479c0c5a842b3fb4d58c19, it
contained a no-op matching condition: the 'qtypes' attribute for
LargeReferralHandler was set to [dns.rdatatype.NS], even though that
handler was defined as a subclass of QnameHandler, which ignores QTYPE.
Later on, commit 1645b09341806e08cc7c997c0d0f20a99db17851 inadvertently
"promoted" that no-op matching condition to an effective one by making
LargeReferralHandler a subclass of QnameQtypeHandler, which does take
QTYPE into consideration. As a result, the ans3 server started sending
the large referral only in response to NS queries, which the tested
resolver never sends. This allowed the test to pass without actually
testing anything.
Fix the above flaw by dropping the offending Qtype(dns.rdatatype.NS)
matcher. Tweak the referral target for clarity, from redirect.com to
large-referral.com.
diff --git a/bin/tests/system/resolver/ans2/ans.py b/bin/tests/system/resolver/ans2/ans.py
index 29dd9e8a4a..dd66d980b5 100644
--- a/bin/tests/system/resolver/ans2/ans.py
+++ b/bin/tests/system/resolver/ans2/ans.py
@@ -150,7 +150,7 @@ class Ns4Delegation(DelegationHandler):
class Ns6Delegation(DelegationHandler):
domains = [
- "redirect.com.",
+ "large-referral.com.",
"tld1.",
]
server_number = 6
diff --git a/bin/tests/system/resolver/ans3/ans.py b/bin/tests/system/resolver/ans3/ans.py
index a15400dbfa..e23ae9d21d 100644
--- a/bin/tests/system/resolver/ans3/ans.py
+++ b/bin/tests/system/resolver/ans3/ans.py
@@ -117,12 +117,12 @@ class LameExampleOrgDelegation(DelegationHandler):
class LargeReferralHandler(StaticResponseHandler):
- matcher = Qname("large-referral.example.net.") & Qtype(dns.rdatatype.NS)
+ matcher = Qname("large-referral.example.net.")
authority = [
rrset_from_list(
matcher.of(Qname).qnames[0],
dns.rdatatype.NS,
- [f"ns{i}.fake.redirect.com." for i in range(1, 1000)],
+ [f"ns{i}.fake.large-referral.com." for i in range(1, 1000)],
)
]
diff --git a/bin/tests/system/resolver/ns6/redirect.com.db b/bin/tests/system/resolver/ns6/large-referral.com.db
similarity index 100%
rename from bin/tests/system/resolver/ns6/redirect.com.db
rename to bin/tests/system/resolver/ns6/large-referral.com.db
diff --git a/bin/tests/system/resolver/ns6/named.conf.j2 b/bin/tests/system/resolver/ns6/named.conf.j2
index c99c25d208..0818c9b768 100644
--- a/bin/tests/system/resolver/ns6/named.conf.j2
+++ b/bin/tests/system/resolver/ns6/named.conf.j2
@@ -40,9 +40,9 @@ zone "broken" {
allow-update { any; };
};
-zone "redirect.com" {
+zone "large-referral.com" {
type primary;
- file "redirect.com.db";
+ file "large-referral.com.db";
};
zone "tld1" {