--- /dev/null
+; 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 .
+$GENERATE 1-5000 host$ TXT data-$
file "edns-expire.db";
};
+zone "axfr-min-transfer-rate" {
+ type primary;
+ file "axfr-min-transfer-rate.db";
+};
zone "axfr-max-transfer-time" {
type primary;
file "root.db";
};
+zone "axfr-min-transfer-rate" {
+ type primary;
+ file "axfr-min-transfer-rate.db";
+};
+
zone "axfr-max-transfer-time" {
type primary;
file "axfr-max-transfer-time.db";
ixfr-from-differences primary;
check-integrity no;
tcp-idle-timeout 600;
+ min-transfer-rate-in 10240 300; # this is tested as seconds, when used with '-T transferinsecs' (i.e. convert the default '10240 5' back so that it doesn't interfere with other tests)
};
zone "." {
file "edns-expire.bk";
};
+zone "axfr-min-transfer-rate" {
+ type secondary;
+ min-transfer-rate-in 100000 5; # this is tested as seconds, when used with '-T transferinsecs' (i.e. 100000 bytes in 5 seconds)
+ primaries { 10.53.0.1; };
+ file "axfr-min-transfer-rate.bk";
+};
+
zone "axfr-max-transfer-time" {
type secondary;
max-transfer-time-in 1; # this is tested as seconds, when used with '-T transferinsecs'
nextpart ns6/named.run >/dev/null
+n=$((n + 1))
+echo_i "test min-transfer-rate-in with 5 seconds timeout ($n)"
+$RNDCCMD 10.53.0.6 retransfer axfr-min-transfer-rate 2>&1 | sed 's/^/ns6 /' | cat_i
+tmp=0
+retry_quiet 10 wait_for_message "minimum transfer rate reached: timed out" || tmp=1
+if test $tmp != 0; then echo_i "failed"; fi
+status=$((status + tmp))
+
+nextpart ns6/named.run >/dev/null
+
n=$((n + 1))
echo_i "test max-transfer-time-in with 1 second timeout ($n)"
$RNDCCMD 10.53.0.6 retransfer axfr-max-transfer-time 2>&1 | sed 's/^/ns6 /' | cat_i
tmp=0
retry_quiet 10 wait_for_message "maximum transfer time exceeded: timed out" || tmp=1
+if test $tmp != 0; then echo_i "failed"; fi
status=$((status + tmp))
# Restart ns1 with -T transferstuck
$RNDCCMD 10.53.0.6 retransfer axfr-max-idle-time 2>&1 | sed 's/^/ns6 /' | cat_i
tmp=0
retry_quiet 60 wait_for_message "maximum idle time exceeded: timed out" || tmp=1
+if test $tmp != 0; then echo_i "failed"; fi
if [ $tmp -eq 0 ]; then
now=$(date +%s)
diff=$((now - start))
"ns4/root.db",
"ns6/axfr-max-idle-time.bk",
"ns6/axfr-max-transfer-time.bk",
+ "ns6/axfr-min-transfer-rate.bk",
"ns6/axfr-rndc-retransfer-force.bk",
"ns6/edns-expire.bk",
"ns6/ixfr-too-big.bk",