--- /dev/null
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; SPDX-License-Identifier: MPL-2.0
+;
+; 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 https://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+$TTL 3600
+@ SOA ns1 hostmaster 1 3600 1200 604800 3600
+@ NS ns1
+ns1 A 10.53.0.1
+; \007 sorts before * so the covering NSEC for the wildcard is not
+; the apex NSEC.
+\007 HINFO "" ""
+nodata TXT nodata
+*.wild-a A 1.2.3.4
+*.wild-cname CNAME ns1
+*.wild-1-nsec A 1.2.3.4
+*.wild-2-nsec A 1.2.3.4
+_x.wild-2-nsec TXT a name beween wild-2-nsec and a.wild-2-nsec
+*.wild-2-nsec-afterdata A 1.2.3.4
+*.wild-2-nsec-afterdata AAAA 2002::1
+_x.wild-2-nsec-afterdata TXT a name beween wild-2-nsec-afterdata and a.wild-2-nsec-afterdata
+dnamed DNAME dnamed.
$SIGNER -P -o $zone $zonefile >/dev/null
+zone=no-apex-covering
+infile=no-apex-covering.db.in
+zonefile=no-apex-covering.db
+
+keyname=$($KEYGEN -q -a ${DEFAULT_ALGORITHM} $zone)
+cat "$infile" "$keyname.key" >"$zonefile"
+echo insecure NS ns1.insecure >>"$zonefile"
+echo ns1.insecure A 10.53.0.1 >>"$zonefile"
+
+$SIGNER -P -o $zone $zonefile >/dev/null
+
zone=insecure.example
infile=example.db.in
zonefile=insecure.example.db
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
+ echo_i "prime negative NXDOMAIN response no-apex-covering (synth-from-dnssec ${description};) ($n)"
+ ret=0
+ dig_with_opts a.no-apex-covering. @10.53.0.${ns} a >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 no-apex-covering. dig.out.ns${ns}.test$n || ret=1
+ [ $ns -eq 2 ] && cp dig.out.ns${ns}.test$n no-apex-covering.out
+ n=$((n + 1))
+ if [ $ret != 0 ]; then echo_i "failed"; fi
+ status=$((status + ret))
+
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
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
+ echo_i "check synthesized NXDOMAIN response no-apex-covering (synth-from-dnssec ${description};) ($n)"
+ ret=0
+ nextpart ns1/named.run >/dev/null
+ dig_with_opts b.no-apex-covering. @10.53.0.${ns} a >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
+ check_synth_soa no-apex-covering. dig.out.ns${ns}.test$n || ret=1
+ nextpart ns1/named.run | grep b.no-apex-covering/A >/dev/null && ret=1
+ else
+ check_nosynth_soa no-apex-covering. dig.out.ns${ns}.test$n || ret=1
+ nextpart ns1/named.run | grep b.no-apex-covering/A >/dev/null || ret=1
+ fi
+ digcomp no-apex-covering.out dig.out.ns${ns}.test$n || ret=1
+ n=$((n + 1))
+ if [ $ret != 0 ]; then echo_i "failed"; fi
+ status=$((status + ret))
+
echo_i "check synthesized NODATA response (synth-from-dnssec ${description};) ($n)"
ret=0
nextpart ns1/named.run >/dev/null
for synthesized in NXDOMAIN no-data wildcard; do
case $synthesized in
- NXDOMAIN) count=1 ;;
+ NXDOMAIN) count=2 ;;
no-data) count=4 ;;
wildcard) count=2 ;;
esac
for synthesized in SynthNXDOMAIN SynthNODATA SynthWILDCARD; do
case $synthesized in
- SynthNXDOMAIN) count=1 ;;
+ SynthNXDOMAIN) count=2 ;;
SynthNODATA) count=4 ;;
SynthWILDCARD) count=2 ;;
esac
for synthesized in SynthNXDOMAIN SynthNODATA SynthWILDCARD; do
case $synthesized in
- SynthNXDOMAIN) count=1 ;;
+ SynthNXDOMAIN) count=2 ;;
SynthNODATA) count=4 ;;
SynthWILDCARD) count=2 ;;
esac
"insecure.wildnodata2nsecafterdata.out",
"json.out*",
"minimal.nxdomain.out",
+ "no-apex-covering.out",
"nodata.out",
"nxdomain.out",
"wild.out",
"ns1/insecure.example.db.signed",
"ns1/minimal.db",
"ns1/minimal.db.signed",
+ "ns1/no-apex-covering.db",
+ "ns1/no-apex-covering.db.signed",
"ns1/root.db",
"ns1/root.db.signed",
"ns1/soa-without-dnskey.db",