]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
NSEC3PARAM support was added to Net::DNS in 1.00_06
authorMark Andrews <marka@isc.org>
Fri, 30 Apr 2021 02:48:37 +0000 (12:48 +1000)
committerMark Andrews <marka@isc.org>
Fri, 30 Apr 2021 06:29:57 +0000 (16:29 +1000)
Require 1.01 or later to when adding a NSEC3PARAM records.

(cherry picked from commit 044933756ae0bc1f95054054a682ee9b48f03a05)

bin/tests/system/nsupdate/tests.sh
bin/tests/system/nsupdate/update_test.pl

index af2c705dd41a68a75e294d72b3ca8150d5f58feb..1d49a63de809ff203dbb7da0187c2c0e36c6bc3d 100755 (executable)
@@ -309,7 +309,10 @@ then
     {
       $PERL update_test.pl -s 10.53.0.1 -p ${PORT} update.nil. || ret=1
     } | cat_i
-    grep "updating zone 'update.nil/IN': too many NSEC3 iterations (151)" ns1/named.run > /dev/null || ret=1
+    if $PERL -e 'use Net::DNS; die "Net::DNS too old ($Net::DNS::VERSION < 1.01)" if ($Net::DNS::VERSION < 1.01)' > /dev/null
+    then
+        grep "updating zone 'update.nil/IN': too many NSEC3 iterations (151)" ns1/named.run > /dev/null || ret=1
+    fi
     [ $ret -eq 1 ] && { echo_i "failed"; status=1; }
 else
     echo_i "The second part of this test requires the Net::DNS library." >&2
index fd6a5425aa0a3ae8950d379d2a1ea2b5f8bd3421..720a6b89ff588f061ac5dd15750f04f25957a0c8 100644 (file)
@@ -410,9 +410,13 @@ test("NOERROR", ["update", rr_add("u.$zone 300 NS ns.u.$zone")]);
 
 test("NOERROR", ["update", rr_del("u.$zone NS ns.u.$zone")]);
 
-section("Excessive NSEC3PARAM iterations");
-test("REFUSED", ["update", rr_add("$zone 300 NSEC3PARAM 1 0 151 -")]);
-test("NOERROR", ["update", rr_add("$zone 300 NSEC3PARAM 1 0 150 -")]);
+if ($Net::DNS::VERSION < 1.01) {
+    print "skipped Excessive NSEC3PARAM iterations; Net::DNS too old.\n";
+} else {
+    section("Excessive NSEC3PARAM iterations");
+    test("REFUSED", ["update", rr_add("$zone 300 NSEC3PARAM 1 0 151 -")]);
+    test("NOERROR", ["update", rr_add("$zone 300 NSEC3PARAM 1 0 150 -")]);
+}
 
 if ($failures) {
     print "$failures tests failed.\n";