]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add system test
authorMukund Sivaraman <muks@isc.org>
Wed, 2 May 2018 07:37:14 +0000 (13:07 +0530)
committerEvan Hunt <each@isc.org>
Fri, 8 Jun 2018 18:05:20 +0000 (11:05 -0700)
(cherry picked from commit 303391ea415cd3c09c285a1e11c988e11c540974)

bin/tests/system/dnssec/tests.sh

index 4a3a1ee248d45048936170a67179ceb35e7b5874..5f27303c85e8067ee87a3cde1bfb93e7f8ff37df 100644 (file)
@@ -73,6 +73,23 @@ israw1 () {
     return $?
 }
 
+# strip NS and RRSIG NS from input
+stripns () {
+    awk '($4 == "NS") || ($4 == "RRSIG" && $5 == "NS") { next} { print }' $1
+}
+
+# Check that for a query against a validating resolver where the
+# authoritative zone is unsigned (insecure delegation), glue is returned
+# in the additional section
+echo_i "checking that additional glue is returned for unsigned delegation ($n)"
+ret=0
+$DIG +tcp +dnssec -p ${PORT} a.insecure.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
+grep "ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2" dig.out.ns4.test$n > /dev/null || ret=1
+grep "ns\.insecure\.example\..*A.10\.53\.0\.3" dig.out.ns4.test$n > /dev/null || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=`expr $status + $ret`
+
 # Check the example. domain
 
 echo_i "checking that zone transfer worked ($n)"