diff --git a/bin/tests/system/xfer/ns1/ixfr-too-many-diffs.db b/bin/tests/system/xfer/ns1/ixfr-too-many-diffs.db new file mode 100644 index 0000000000..c192316f91 --- /dev/null +++ b/bin/tests/system/xfer/ns1/ixfr-too-many-diffs.db @@ -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.$ diff --git a/bin/tests/system/xfer/ns1/named1.conf.in b/bin/tests/system/xfer/ns1/named1.conf.in index d3f597dfda..c7e844964e 100644 --- a/bin/tests/system/xfer/ns1/named1.conf.in +++ b/bin/tests/system/xfer/ns1/named1.conf.in @@ -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"; diff --git a/bin/tests/system/xfer/ns6/named.conf.in b/bin/tests/system/xfer/ns6/named.conf.in index e98fc3b588..ea14584985 100644 --- a/bin/tests/system/xfer/ns6/named.conf.in +++ b/bin/tests/system/xfer/ns6/named.conf.in @@ -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"; +}; diff --git a/bin/tests/system/xfer/tests.sh b/bin/tests/system/xfer/tests.sh index feeb3a679f..a379a6a705 100755 --- a/bin/tests/system/xfer/tests.sh +++ b/bin/tests/system/xfer/tests.sh @@ -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 </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