]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Extend synthfromdnssec to test with dnssec validation disabled
authorMark Andrews <marka@isc.org>
Mon, 18 Oct 2021 04:38:41 +0000 (15:38 +1100)
committerPetr Špaček <pspacek@isc.org>
Thu, 2 Dec 2021 13:18:41 +0000 (14:18 +0100)
bin/tests/system/synthfromdnssec/ns6/named.conf.in [new file with mode: 0644]
bin/tests/system/synthfromdnssec/ns6/root.hints [new file with mode: 0644]
bin/tests/system/synthfromdnssec/setup.sh
bin/tests/system/synthfromdnssec/tests.sh

diff --git a/bin/tests/system/synthfromdnssec/ns6/named.conf.in b/bin/tests/system/synthfromdnssec/ns6/named.conf.in
new file mode 100644 (file)
index 0000000..f6c137d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+// NS6
+
+options {
+       query-source address 10.53.0.6;
+       notify-source 10.53.0.6;
+       transfer-source 10.53.0.6;
+       port @PORT@;
+       pid-file "named.pid";
+       listen-on { 10.53.0.6; };
+       listen-on-v6 { none; };
+       recursion yes;
+       notify no;
+       dnssec-validation no;
+       synth-from-dnssec yes;
+};
+
+zone "." {
+       type hint;
+       file "root.hints";
+};
+
+include "../ns1/trusted.conf";
diff --git a/bin/tests/system/synthfromdnssec/ns6/root.hints b/bin/tests/system/synthfromdnssec/ns6/root.hints
new file mode 100644 (file)
index 0000000..63fc22d
--- /dev/null
@@ -0,0 +1,11 @@
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0. If a copy of the MPL was not distributed with this
+; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+.      NS      ns1
+ns1    A       10.53.0.1
index 5bf58e637081d62f886d43a2ea4ff04a838d0268..067aa0e753c3d957c84d5236e3a4aa90d3632feb 100644 (file)
@@ -19,6 +19,7 @@ copy_setports ns2/named.conf.in ns2/named.conf
 copy_setports ns3/named.conf.in ns3/named.conf
 copy_setports ns4/named.conf.in ns4/named.conf
 copy_setports ns5/named.conf.in ns5/named.conf
+copy_setports ns6/named.conf.in ns6/named.conf
 
 (
     cd ns1
index f3553b45a3d91eec9f4bb2c6132fcf113a217ea0..70ac6eedc204fafd44cb372130ff78d7136d9441 100644 (file)
@@ -77,18 +77,19 @@ check_nosynth_cname() (
     return 0
 )
 
-for ns in 2 4 5
+for ns in 2 4 5 6
 do
     case $ns in
-    2) description="<default>";;
-    4) description="no";;
-    5) description="yes";;
+    2) ad=yes; description="<default>";;
+    4) ad=yes; description="no";;
+    5) ad=yes; description="yes";;
+    6) ad=no; description="yes; dnssec-validation no";;
     *) exit 1;;
     esac
     echo_i "prime negative NXDOMAIN response (synth-from-dnssec ${description};) ($n)"
     ret=0
     dig_with_opts a.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NXDOMAIN dig.out.ns${ns}.test$n || ret=1
     check_nosynth_soa example. dig.out.ns${ns}.test$n || ret=1
     [ $ns -eq 2 ] && cp dig.out.ns${ns}.test$n nxdomain.out
@@ -99,7 +100,7 @@ do
     echo_i "prime negative NODATA response (synth-from-dnssec ${description};) ($n)"
     ret=0
     dig_with_opts nodata.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NOERROR dig.out.ns${ns}.test$n || ret=1
     check_nosynth_soa example. dig.out.ns${ns}.test$n || ret=1
     [ $ns -eq 2 ] && cp dig.out.ns${ns}.test$n nodata.out
@@ -110,7 +111,7 @@ do
     echo_i "prime wildcard response (synth-from-dnssec ${description};) ($n)"
     ret=0
     dig_with_opts a.wild-a.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NOERROR dig.out.ns${ns}.test$n || ret=1
     check_nosynth_a a.wild-a.example. dig.out.ns${ns}.test$n || ret=1
     [ $ns -eq 2 ] && sed 's/^a\./b./' dig.out.ns${ns}.test$n > wild.out
@@ -121,7 +122,7 @@ do
     echo_i "prime wildcard CNAME response (synth-from-dnssec ${description};) ($n)"
     ret=0
     dig_with_opts a.wild-cname.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NOERROR dig.out.ns${ns}.test$n || ret=1
     check_nosynth_cname a.wild-cname.example. dig.out.ns${ns}.test$n || ret=1
     [ $ns -eq 2 ] && sed 's/^a\./b./' dig.out.ns${ns}.test$n > wildcname.out
@@ -189,19 +190,20 @@ status=$((status+ret))
 #
 sleep 1
 
-for ns in 2 4 5
+for ns in 2 4 5 6
 do
     case $ns in
-    2) synth=no description="<default>";;
-    4) synth=no  description="no";;
-    5) synth=yes description="yes";;
+    2) ad=yes synth=no description="<default>";;
+    4) ad=yes synth=no description="no";;
+    5) ad=yes synth=yes description="yes";;
+    6) ad=no synth=no description="yes; dnssec-validation no";;
     *) exit 1;;
     esac
     echo_i "check synthesized NXDOMAIN response (synth-from-dnssec ${description};) ($n)"
     ret=0
     nextpart ns1/named.run > /dev/null
     dig_with_opts b.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NXDOMAIN dig.out.ns${ns}.test$n || ret=1
     if [ ${synth} = yes ]
     then
@@ -220,7 +222,7 @@ do
     ret=0
     nextpart ns1/named.run > /dev/null
     dig_with_opts nodata.example. @10.53.0.${ns} aaaa > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NOERROR dig.out.ns${ns}.test$n || ret=1
     if [ ${synth} = yes ]
     then
@@ -239,7 +241,7 @@ do
     ret=0
     nextpart ns1/named.run > /dev/null
     dig_with_opts b.wild-a.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NOERROR dig.out.ns${ns}.test$n || ret=1
     if [ ${synth} = yes ]
     then
@@ -258,7 +260,7 @@ do
     ret=0
     nextpart ns1/named.run > /dev/null
     dig_with_opts b.wild-cname.example. @10.53.0.${ns} a > dig.out.ns${ns}.test$n || ret=1
-    check_ad_flag yes dig.out.ns${ns}.test$n || ret=1
+    check_ad_flag $ad dig.out.ns${ns}.test$n || ret=1
     check_status NOERROR dig.out.ns${ns}.test$n || ret=1
     if [ ${synth} = yes ]
     then