Don't synthesize NXDOMAIN from NSEC for records under a DNAME

This commit is contained in:
Witold Kręcicki
2018-07-05 12:58:49 +02:00
committed by Witold Krecicki
parent cd0e7df6fc
commit 7f60bb39df
10 changed files with 51 additions and 2 deletions

View File

@@ -16,6 +16,8 @@ rm -f ns1/K*+*+*.private
rm -f ns1/dsset-*
rm -f ns1/example.db
rm -f ns1/example.db.signed
rm -f ns1/dnamed.db
rm -f ns1/dnamed.db.signed
rm -f ns1/root.db
rm -f ns1/root.db.signed
rm -f ns1/trusted.conf

View File

@@ -0,0 +1,14 @@
; 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.
$TTL 3600
@ SOA ns1 hostmaster 1 3600 1200 604800 3600
@ NS ns1
ns1 A 10.53.0.1
a A 10.53.0.1

View File

@@ -14,3 +14,4 @@ ns1 A 10.53.0.1
nodata TXT nodata
*.wild-a A 1.2.3.4
*.wild-cname CNAME ns1
dnamed DNAME dnamed.

View File

@@ -35,4 +35,9 @@ zone "example" {
file "example.db.signed";
};
zone "dnamed" {
type master;
file "dnamed.db.signed";
};
include "trusted.conf";

View File

@@ -13,3 +13,5 @@ $TTL 3600
ns1 A 10.53.0.1
example NS ns1.example
ns1.example A 10.53.0.1
dnamed NS ns1.dnamed
ns1.dnamed A 10.53.0.1

View File

@@ -21,6 +21,15 @@ cat $infile $keyname.key > $zonefile
$SIGNER -P -o $zone $zonefile > /dev/null
zone=dnamed
infile=dnamed.db.in
zonefile=dnamed.db
keyname=`$KEYGEN -q -a RSASHA256 -b 2048 -n zone $zone`
cat $infile $keyname.key > $zonefile
$SIGNER -P -o $zone $zonefile > /dev/null
zone=.
infile=root.db.in
zonefile=root.db

View File

@@ -182,5 +182,15 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "check DNAME handling (synth-from-dnssec yes;) ($n)"
ret=0
$DIG $DIGOPTS dnamed.example. ns @10.53.0.5 > dig.out.ns5.test$n || ret=1
$DIG $DIGOPTS a.dnamed.example. a @10.53.0.5 > dig.out.ns5-1.test$n || ret=1
grep "status: NOERROR," dig.out.ns5-1.test$n > /dev/null || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1