From: Aram Sargsyan Date: Wed, 26 Nov 2025 13:50:16 +0000 (+0000) Subject: Add a check to the catz test to confirm that the issue is fixed X-Git-Tag: v9.21.17~50^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2622140482f1df338d3d4cd2acc102ffc4fd4801;p=thirdparty%2Fbind9.git Add a check to the catz test to confirm that the issue is fixed Use a member zone with a long list of primaries with long key names to trigger the issue that was fixed by the previous commit. --- diff --git a/bin/tests/system/catz/ns1/named.conf.in b/bin/tests/system/catz/ns1/named.conf.in index 9d508440bd1..dc1e2d93f4d 100644 --- a/bin/tests/system/catz/ns1/named.conf.in +++ b/bin/tests/system/catz/ns1/named.conf.in @@ -137,6 +137,16 @@ view "default" { also-notify { 10.53.0.4; }; notify explicit; }; + + # A catalog zone to test specific issues + zone "catalog-misc.example" { + type primary; + file "catalog-misc.example.db"; + allow-transfer { any; }; + allow-update { any; }; + also-notify { 10.53.0.4; }; + notify explicit; + }; }; view "ch" ch { @@ -162,3 +172,8 @@ key next_key. { secret "LaAnCU+Z"; algorithm @DEFAULT_HMAC@; }; + +key longlonglongname0123456789abcdef. { + secret "LaAnCU+Z"; + algorithm @DEFAULT_HMAC@; +}; diff --git a/bin/tests/system/catz/ns4/named.conf.in b/bin/tests/system/catz/ns4/named.conf.in index 75cb19e3ea7..87caf74913b 100644 --- a/bin/tests/system/catz/ns4/named.conf.in +++ b/bin/tests/system/catz/ns4/named.conf.in @@ -35,6 +35,9 @@ options { dnssec-validation no; catalog-zones { + zone "catalog-misc.example" + min-update-interval 1s + default-primaries { 10.53.0.1; }; zone "catalog-tls.example" min-update-interval 1s default-primaries { 10.53.0.1 key tsig_key tls ephemeral; }; @@ -50,6 +53,12 @@ zone "catalog-tls.example" { primaries { 10.53.0.1 key tsig_key tls ephemeral; }; }; +zone "catalog-misc.example" { + type secondary; + file "catalog-misc.example.db"; + primaries { 10.53.0.1; }; +}; + zone "catalog-self.example" { type primary; file "catalog-self.example.db"; @@ -65,3 +74,8 @@ key next_key. { secret "LaAnCU+Z"; algorithm @DEFAULT_HMAC@; }; + +key longlonglongname0123456789abcdef. { + secret "LaAnCU+Z"; + algorithm @DEFAULT_HMAC@; +}; diff --git a/bin/tests/system/catz/setup.sh b/bin/tests/system/catz/setup.sh index 21474678f14..38339e2bd8f 100644 --- a/bin/tests/system/catz/setup.sh +++ b/bin/tests/system/catz/setup.sh @@ -25,6 +25,7 @@ cp -f ns1/catalog.example.db.in ns1/catalog3.example.db cp -f ns1/catalog.example.db.in ns1/catalog4.example.db # catalog5 is missing on purpose cp -f ns1/catalog.example.db.in ns1/catalog6.example.db +cp -f ns1/catalog.example.db.in ns1/catalog-misc.example.db cp -f ns1/catalog.example.db.in ns1/catalog-tls.example.db cp -f ns4/catalog.example.db.in ns4/catalog-self.example.db diff --git a/bin/tests/system/catz/tests.sh b/bin/tests/system/catz/tests.sh index be3e3f4be9f..b1d965b2476 100644 --- a/bin/tests/system/catz/tests.sh +++ b/bin/tests/system/catz/tests.sh @@ -2641,6 +2641,74 @@ wait_for_soa @10.53.0.4 tls1.example. dig.out.test$n || ret=1 if [ $ret -ne 0 ]; then echo_i "failed"; fi status=$((status + ret)) +########################################################################## +# GL #5658 + +n=$((n + 1)) +echo_i "Adding a domain longlong.longlong.long.long.name.example. to primary via RNDC ($n)" +ret=0 +# enough initial content for IXFR response when TXT record is added below +echo "@ 3600 IN SOA . . 1 3600 3600 3600 3600" >ns1/longlong.longlong.long.long.name.example.db +echo "@ 3600 IN NS invalid." >>ns1/longlong.longlong.long.long.name.example.db +echo "foo 3600 IN TXT some content here" >>ns1/longlong.longlong.long.long.name.example.db +echo "bar 3600 IN TXT some content here" >>ns1/longlong.longlong.long.long.name.example.db +echo "xxx 3600 IN TXT some content here" >>ns1/longlong.longlong.long.long.name.example.db +echo "yyy 3600 IN TXT some content here" >>ns1/longlong.longlong.long.long.name.example.db +rndccmd 10.53.0.1 addzone longlong.longlong.long.long.name.example. in default '{ type primary; file "longlong.longlong.long.long.name.example.db"; allow-transfer { key longlonglongname0123456789abcdef; }; allow-update { any; }; notify explicit; also-notify { 10.53.0.4; }; };' || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "checking that longlong.longlong.long.long.name.example. is now served by primary ($n)" +ret=0 +wait_for_soa @10.53.0.1 longlong.longlong.long.long.name.example. dig.out.test$n || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +nextpart ns4/named.run >/dev/null + +n=$((n + 1)) +echo_i "Adding domain longlong.longlong.long.long.name.example. to catalog-misc zone ($n)" +ret=0 +$NSUPDATE -d <>nsupdate.out.test$n 2>&1 || ret=1 + server 10.53.0.1 ${PORT} + update add longlong.zones.catalog-misc.example. 3600 IN PTR longlong.longlong.long.long.name.example. + update add label1.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label1.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + update add label2.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label2.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + update add label3.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label3.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + update add label4.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label4.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + update add label5.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label5.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + update add label6.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label6.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + update add label7.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label7.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + update add label8.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN A 10.53.0.1 + update add label8.primaries.ext.longlong.zones.catalog-misc.example. 3600 IN TXT "longlonglongname0123456789abcdef" + send +END +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "waiting for secondary to sync up ($n)" +ret=0 +wait_for_message ns4/named.run "catz: adding zone 'longlong.longlong.long.long.name.example' from catalog 'catalog-misc.example'" \ + && wait_for_message ns4/named.run "transfer of 'longlong.longlong.long.long.name.example/IN' from 10.53.0.1#${PORT}: Transfer status: success" || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + +n=$((n + 1)) +echo_i "checking that longlong.longlong.long.long.name.example. is served by secondary ($n)" +ret=0 +wait_for_soa @10.53.0.4 longlong.longlong.long.long.name.example. dig.out.test$n || ret=1 +if [ $ret -ne 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + ########################################################################## # GL #3777 nextpart ns4/named.run >/dev/null diff --git a/bin/tests/system/catz/tests_sh_catz.py b/bin/tests/system/catz/tests_sh_catz.py index 639a0f3f0e9..060e45fc0ff 100644 --- a/bin/tests/system/catz/tests_sh_catz.py +++ b/bin/tests/system/catz/tests_sh_catz.py @@ -21,6 +21,7 @@ pytestmark = pytest.mark.extra_artifacts( "ns*/*.nzd*", "ns*/catalog*.example.db", "ns*/*dom*.example.db", + "ns1/longlong.longlong.long.long.name.example.db", "ns1/tls1.example.db", "ns2/__catz__*.db", "ns2/named.conf.tmp",