add a test with CD=1 query for pending data
this is a regression test for [GL #3247].
This commit is contained in:
@@ -30,7 +30,7 @@ fi
|
||||
# from the first test pass so the second pass can be set up correctly.
|
||||
# remove those files first, then decide whether to remove the others.
|
||||
rm -f ns*/*.key ns*/*.private
|
||||
rm -f ns2/tld2s.db ns2/bl.tld2.db
|
||||
rm -f ns2/tld2s.db */bl.tld2.db */bl.tld2s.db
|
||||
rm -f ns3/bl*.db ns3/fast-expire.db ns*/empty.db
|
||||
rm -f ns3/manual-update-rpz.db
|
||||
rm -f ns3/mixed-case-rpz.db
|
||||
|
||||
@@ -23,3 +23,4 @@ a0-1-scname CNAME a0-1.tld2.
|
||||
|
||||
a3-5 A 192.168.3.5
|
||||
|
||||
a7-2 A 192.168.7.2
|
||||
|
||||
@@ -120,3 +120,6 @@ a6-2 A 192.168.6.2
|
||||
|
||||
a7-1 A 192.168.7.1
|
||||
TXT "a7-1 tld2 text"
|
||||
|
||||
a7-2 A 192.168.7.2
|
||||
TXT "a7-2 tld2 text"
|
||||
|
||||
20
bin/tests/system/rpz/ns6/bl.tld2s.db.in
Normal file
20
bin/tests/system/rpz/ns6/bl.tld2s.db.in
Normal file
@@ -0,0 +1,20 @@
|
||||
; 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 rpz.tld2. hostmaster.ns.tld2. ( 3 3600 1200 604800 60 )
|
||||
NS ns2
|
||||
NS ns3
|
||||
ns2 A 10.53.0.2
|
||||
ns3 A 10.53.0.3
|
||||
|
||||
32.2.7.168.192.rpz-ip A 1.1.1.1
|
||||
AAAA ::1
|
||||
@@ -30,6 +30,7 @@ options {
|
||||
|
||||
response-policy {
|
||||
zone "policy1" min-update-interval 0;
|
||||
zone "bl.tld2s" policy given;
|
||||
} qname-wait-recurse yes
|
||||
// add-soa yes # leave add-soa as default for unset test
|
||||
nsip-enable yes
|
||||
@@ -59,3 +60,8 @@ zone "policy1" {
|
||||
notify-delay 0;
|
||||
allow-transfer { any; };
|
||||
};
|
||||
|
||||
zone "bl.tld2s." {
|
||||
type primary;
|
||||
file "bl.tld2s.db";
|
||||
};
|
||||
|
||||
@@ -168,6 +168,7 @@ $PERL -e 'for ($cnt = $val = 1; $cnt <= 3000; ++$cnt) {
|
||||
cp ns2/bl.tld2.db.in ns2/bl.tld2.db
|
||||
cp ns5/empty.db.in ns5/empty.db
|
||||
cp ns5/empty.db.in ns5/policy2.db
|
||||
cp ns6/bl.tld2s.db.in ns6/bl.tld2s.db
|
||||
|
||||
# Run dnsrpzd to get the license and prime the static policy zones
|
||||
if test -n "$TEST_DNSRPS"; then
|
||||
|
||||
@@ -982,6 +982,15 @@ EOF
|
||||
done
|
||||
done
|
||||
|
||||
if [ native = "$mode" ]; then
|
||||
t=`expr $t + 1`
|
||||
echo_i "checking that rewriting CD=1 queries handles pending data correctly (${t})"
|
||||
$RNDCCMD $ns3 flush
|
||||
$RNDCCMD $ns6 flush
|
||||
$DIG a7-2.tld2s -p ${PORT} @$ns6 +cd > dig.out.${t}
|
||||
grep -w "1.1.1.1" dig.out.${t} > /dev/null || setret "failed"
|
||||
fi
|
||||
|
||||
[ $status -ne 0 ] && pf=fail || pf=pass
|
||||
case $mode in
|
||||
native)
|
||||
|
||||
Reference in New Issue
Block a user