Commit 24cd018969 for bind
commit 24cd018969660b6380f4588a5bdd8740d4f857ec
Author: Evan Hunt <each@isc.org>
Date: Thu Oct 29 23:37:57 2026 -0700
Add a regression test
Update a zone with a DELEG record containing an invalid name,
then try to look it up. Previously this triggered an assertion.
diff --git a/bin/tests/system/deleg/ns1/named.conf.j2 b/bin/tests/system/deleg/ns1/named.conf.j2
index e6927cbbcf..c779310b14 100644
--- a/bin/tests/system/deleg/ns1/named.conf.j2
+++ b/bin/tests/system/deleg/ns1/named.conf.j2
@@ -24,6 +24,8 @@ options {
recursion no;
dnssec-validation no;
allow-transfer { any; };
+ check-names response warn;
+ allow-update { localhost; };
};
dnssec-policy nsec {
diff --git a/bin/tests/system/deleg/tests_auth.py b/bin/tests/system/deleg/tests_auth.py
index 76d6c0b780..86792149af 100644
--- a/bin/tests/system/deleg/tests_auth.py
+++ b/bin/tests/system/deleg/tests_auth.py
@@ -449,3 +449,18 @@ def test_deleg_noadt_warning(ns1):
count2 = len(ns1.log.grep(Re("signing DELEG but no DNSKEY")))
assert count1 != 0
assert count1 == count2
+
+
+def test_deleg_checknames(ns1):
+ # regression test for #6491: add a DELEG with an invalid name,
+ # then look it up with "check-names response warn"
+ up = update.UpdateMessage("unsigned.")
+ # pylint: disable=anomalous-backslash-in-string
+ up.add("nsonly.unsigned.", 300, 61440, "\# 8 0003000403616263")
+ res = isctest.query.tcp(up, ns1.ip)
+ isctest.check.formerr(res)
+
+ msg = isctest.query.create("nsonly.unsigned.", 61440, deleg=True)
+ res = isctest.query.tcp(msg, ns1.ip)
+ isctest.check.noerror(res)
+ isctest.check.empty_answer(res)