mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Add test for not-loading many RRsets per name on a secondary
This tests makes sure the zone with many RRsets per name is not loaded via XFR on the secondary server.
This commit is contained in:
parent
86aa4674ab
commit
ccde4911ca
@ -29,6 +29,7 @@ $CHECKZONE -D -F raw -L 3333 -o example.db.serial.raw example \
|
|||||||
$CHECKZONE -D -F raw -o large.db.raw large large.db >/dev/null 2>&1
|
$CHECKZONE -D -F raw -o large.db.raw large large.db >/dev/null 2>&1
|
||||||
$CHECKZONE -D -F raw -o huge.db.raw huge huge.db >/dev/null 2>&1
|
$CHECKZONE -D -F raw -o huge.db.raw huge huge.db >/dev/null 2>&1
|
||||||
$CHECKZONE -D -F raw -o uber.db.raw uber uber.db >/dev/null 2>&1
|
$CHECKZONE -D -F raw -o uber.db.raw uber uber.db >/dev/null 2>&1
|
||||||
|
$CHECKZONE -D -F raw -o many.db.raw many many.db >/dev/null 2>&1
|
||||||
|
|
||||||
$KEYGEN -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -f KSK signed >/dev/null 2>&1
|
$KEYGEN -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -f KSK signed >/dev/null 2>&1
|
||||||
$KEYGEN -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" signed >/dev/null 2>&1
|
$KEYGEN -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" signed >/dev/null 2>&1
|
||||||
|
22
bin/tests/system/masterformat/ns1/many.db.in
Normal file
22
bin/tests/system/masterformat/ns1/many.db.in
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
; 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 1D
|
||||||
|
|
||||||
|
@ IN SOA ns hostmaster (
|
||||||
|
1
|
||||||
|
3600
|
||||||
|
1800
|
||||||
|
1814400
|
||||||
|
3
|
||||||
|
)
|
||||||
|
NS ns
|
||||||
|
ns A 10.53.0.1
|
@ -24,6 +24,7 @@ options {
|
|||||||
servfail-ttl 0;
|
servfail-ttl 0;
|
||||||
dnssec-validation no;
|
dnssec-validation no;
|
||||||
max-records-per-type 2050;
|
max-records-per-type 2050;
|
||||||
|
max-types-per-name 500;
|
||||||
};
|
};
|
||||||
|
|
||||||
key rndc_key {
|
key rndc_key {
|
||||||
@ -93,6 +94,7 @@ zone "huge" {
|
|||||||
allow-transfer { any; };
|
allow-transfer { any; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
zone "uber" {
|
zone "uber" {
|
||||||
type primary;
|
type primary;
|
||||||
file "uber.db.raw";
|
file "uber.db.raw";
|
||||||
@ -100,6 +102,13 @@ zone "uber" {
|
|||||||
allow-transfer { any; };
|
allow-transfer { any; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "many" {
|
||||||
|
type primary;
|
||||||
|
file "many.db.raw";
|
||||||
|
masterfile-format raw;
|
||||||
|
allow-transfer { any; };
|
||||||
|
};
|
||||||
|
|
||||||
zone "signed" {
|
zone "signed" {
|
||||||
type primary;
|
type primary;
|
||||||
file "signed.db.raw";
|
file "signed.db.raw";
|
||||||
|
@ -23,6 +23,7 @@ options {
|
|||||||
servfail-ttl 0;
|
servfail-ttl 0;
|
||||||
dnssec-validation no;
|
dnssec-validation no;
|
||||||
max-records-per-type 2000;
|
max-records-per-type 2000;
|
||||||
|
max-types-per-name 200;
|
||||||
};
|
};
|
||||||
|
|
||||||
zone "example" {
|
zone "example" {
|
||||||
@ -70,3 +71,10 @@ zone "huge" {
|
|||||||
masterfile-format raw;
|
masterfile-format raw;
|
||||||
file "huge.bk";
|
file "huge.bk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
zone "many" {
|
||||||
|
type secondary;
|
||||||
|
primaries { 10.53.0.1; };
|
||||||
|
masterfile-format raw;
|
||||||
|
file "many.bk";
|
||||||
|
};
|
||||||
|
@ -43,4 +43,9 @@ awk 'END {
|
|||||||
for (i = 0; i < 2050; i++ ) { print "d TXT", i; }
|
for (i = 0; i < 2050; i++ ) { print "d TXT", i; }
|
||||||
for (i = 0; i < 2100; i++ ) { print "e TXT", i; }
|
for (i = 0; i < 2100; i++ ) { print "e TXT", i; }
|
||||||
}' </dev/null >>ns1/uber.db
|
}' </dev/null >>ns1/uber.db
|
||||||
|
cp ns1/many.db.in ns1/many.db
|
||||||
|
for ntype in $(seq 65280 65534); do
|
||||||
|
echo "m TYPE${ntype} \# 0"
|
||||||
|
done >>ns1/many.db
|
||||||
|
echo "m TXT bunny" >>ns1/many.db
|
||||||
cd ns1 && $SHELL compile.sh
|
cd ns1 && $SHELL compile.sh
|
||||||
|
@ -243,6 +243,29 @@ n=$((n + 1))
|
|||||||
[ $ret -eq 0 ] || echo_i "failed"
|
[ $ret -eq 0 ] || echo_i "failed"
|
||||||
status=$((status + ret))
|
status=$((status + ret))
|
||||||
|
|
||||||
|
echo_i "checking that many types are loaded ($n)"
|
||||||
|
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||||
|
ret=0
|
||||||
|
$DIG +tcp TXT "m.many" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.test$n"
|
||||||
|
grep "status: NOERROR" "dig.out.ns1.test$n" >/dev/null || ret=1
|
||||||
|
[ $ret -eq 0 ] && break
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
n=$((n + 1))
|
||||||
|
[ $ret -eq 0 ] || echo_i "failed"
|
||||||
|
status=$((status + ret))
|
||||||
|
|
||||||
|
echo_i "checking that many types are not transfered ($n)"
|
||||||
|
for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||||
|
$DIG +tcp TXT "m.many" @10.53.0.2 -p "${PORT}" >"dig.out.ns2.test$n"
|
||||||
|
grep "status: SERVFAIL" "dig.out.ns2.test$n" >/dev/null || ret=1
|
||||||
|
[ $ret -eq 0 ] && break
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
n=$((n + 1))
|
||||||
|
[ $ret -eq 0 ] || echo_i "failed"
|
||||||
|
status=$((status + ret))
|
||||||
|
|
||||||
echo_i "checking format transitions: text->raw->text ($n)"
|
echo_i "checking format transitions: text->raw->text ($n)"
|
||||||
ret=0
|
ret=0
|
||||||
$CHECKZONE -D -f text -F text -o baseline.txt example.nil ns1/example.db >/dev/null
|
$CHECKZONE -D -f text -F text -o baseline.txt example.nil ns1/example.db >/dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user