From: Mark Andrews Date: Mon, 18 Oct 2021 04:38:41 +0000 (+1100) Subject: Extend synthfromdnssec to test with dnssec validation disabled X-Git-Tag: v9.17.21~5^2~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e906fefb7d95f1f5ba47f7892f3cc081d53be339;p=thirdparty%2Fbind9.git Extend synthfromdnssec to test with dnssec validation disabled --- diff --git a/bin/tests/system/synthfromdnssec/ns6/named.conf.in b/bin/tests/system/synthfromdnssec/ns6/named.conf.in new file mode 100644 index 00000000000..f6c137d05e7 --- /dev/null +++ b/bin/tests/system/synthfromdnssec/ns6/named.conf.in @@ -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 index 00000000000..63fc22d0e1d --- /dev/null +++ b/bin/tests/system/synthfromdnssec/ns6/root.hints @@ -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 diff --git a/bin/tests/system/synthfromdnssec/setup.sh b/bin/tests/system/synthfromdnssec/setup.sh index 5bf58e63708..067aa0e753c 100644 --- a/bin/tests/system/synthfromdnssec/setup.sh +++ b/bin/tests/system/synthfromdnssec/setup.sh @@ -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 diff --git a/bin/tests/system/synthfromdnssec/tests.sh b/bin/tests/system/synthfromdnssec/tests.sh index f3553b45a3d..70ac6eedc20 100644 --- a/bin/tests/system/synthfromdnssec/tests.sh +++ b/bin/tests/system/synthfromdnssec/tests.sh @@ -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="";; - 4) description="no";; - 5) description="yes";; + 2) ad=yes; description="";; + 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="";; - 4) synth=no description="no";; - 5) synth=yes description="yes";; + 2) ad=yes synth=no description="";; + 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