diff --git a/bin/tests/system/ixfr/tests.sh b/bin/tests/system/ixfr/tests.sh index ca136391ff..6122e23886 100644 --- a/bin/tests/system/ixfr/tests.sh +++ b/bin/tests/system/ixfr/tests.sh @@ -65,6 +65,7 @@ zone "nil" { type secondary; file "myftp.db"; primaries { 10.53.0.2; }; + max-records-per-type 5; # use a small value for fallback test }; EOF @@ -144,6 +145,44 @@ $DIG $DIGOPTS @10.53.0.1 nil. TXT | grep 'fallback AXFR' >/dev/null || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=$((status + ret)) +n=$((n + 1)) +echo_i "testing AXFR fallback after IXFR failure (too many records) ($n)" +ret=0 + +# Provide an IXFR response that would cause a "too many records" condition + +sendcmd </dev/null || ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=$((status + ret)) + n=$((n + 1)) echo_i "testing AXFR fallback after IXFR failure (bad SOA owner) ($n)" ret=0 diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index e5f1e0b536..72b24e15ac 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -859,8 +859,7 @@ xfrin_fail(dns_xfrin_ctx_t *xfr, isc_result_t result, const char *msg) { (void)isc_timer_reset(xfr->max_idle_timer, isc_timertype_inactive, NULL, NULL, true); - if (result != DNS_R_UPTODATE && result != DNS_R_TOOMANYRECORDS) - { + if (result != DNS_R_UPTODATE) { xfrin_log(xfr, ISC_LOG_ERROR, "%s: %s", msg, isc_result_totext(result)); if (xfr->is_ixfr) {