2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Test the 'request-ixfr-max-diffs' configuration option

Configure a maximum of 3 allowed differences and add 5 new records.
Check that named detected that the differences exceed the allowed
limit and successfully retries with AXFR.
This commit is contained in:
Aram Sargsyan
2024-06-07 14:49:59 +00:00
committed by Arаm Sаrgsyаn
parent c05a823e8b
commit 49505cb93d
4 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
; 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
@ IN SOA . . 0 0 0 0 0
@ IN NS ns1
@ IN NS ns6
ns1 IN A 10.53.0.1
ns6 IN A 10.53.0.6
$GENERATE 1-25 host$ A 1.2.3.$

View File

@@ -74,6 +74,12 @@ zone "ixfr-too-big" {
file "ixfr-too-big.db";
};
zone "ixfr-too-many-diffs" {
type primary;
allow-update { any; };
file "ixfr-too-many-diffs.db";
};
zone "xfer-stats" {
type primary;
file "xfer-stats.db";

View File

@@ -90,3 +90,10 @@ zone "ixfr-too-big" {
primaries { 10.53.0.1; };
file "ixfr-too-big.bk";
};
zone "ixfr-too-many-diffs" {
type secondary;
request-ixfr-max-diffs 3;
primaries { 10.53.0.1; };
file "ixfr-too-many-diffs.bk";
};

View File

@@ -591,6 +591,27 @@ wait_for_log 10 "$msg" ns6/named.run || tmp=1
if test $tmp != 0; then echo_i "failed"; fi
status=$((status + tmp))
n=$((n + 1))
echo_i "test that a zone with too many diffs (IXFR) is retried with AXFR ($n)"
tmp=0
nextpart ns6/named.run >/dev/null
$NSUPDATE <<EOF
zone ixfr-too-many-diffs
server 10.53.0.1 ${PORT}
update add the-31st-record.ixfr-too-many-diffs 0 TXT too
update add the-32nd-record.ixfr-too-many-diffs 0 TXT many
update add the-33rd-record.ixfr-too-many-diffs 0 TXT diffs
update add the-34th-record.ixfr-too-many-diffs 0 TXT for
update add the-35th-record.ixfr-too-many-diffs 0 TXT ixfr
send
EOF
msg="'ixfr-too-many-diffs/IN' from 10.53.0.1#${PORT}: Transfer status: success"
wait_for_log 10 "$msg" ns6/named.run || tmp=1
msg="'ixfr-too-many-diffs/IN' from 10.53.0.1#${PORT}: too many diffs, retrying with AXFR"
grep -F "$msg" ns6/named.run >/dev/null || tmp=1
if test $tmp != 0; then echo_i "failed"; fi
status=$((status + tmp))
n=$((n + 1))
echo_i "checking whether dig calculates AXFR statistics correctly ($n)"
tmp=0