From: Aram Sargsyan Date: Tue, 11 Jun 2024 10:53:06 +0000 (+0000) Subject: Do not automatically restart a canceled zone transfer X-Git-Tag: alessio/regression/026024a6ae~12^2~4 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b156531b299819104195c8d964a72d76d542c0e7;p=thirdparty%2Fbind9.git Do not automatically restart a canceled zone transfer If a zone transfer is canceled there is no need to try the next primary or retry with AXFR. --- diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 02488ebaed1..745c7f58a7c 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -1110,7 +1110,10 @@ xfrin_fail(dns_xfrin_t *xfr, isc_result_t result, const char *msg) { { xfrin_log(xfr, ISC_LOG_ERROR, "%s: %s", msg, isc_result_totext(result)); - if (atomic_load(&xfr->is_ixfr)) { + if (atomic_load(&xfr->is_ixfr) && + result != ISC_R_CANCELED && + result != ISC_R_SHUTTINGDOWN) + { /* * Pass special result code to force AXFR retry */ diff --git a/lib/dns/zone.c b/lib/dns/zone.c index ce803abf0bf..24c63aa720c 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -17795,6 +17795,11 @@ again: inc_stats(zone, dns_zonestatscounter_xfrfail); break; + case ISC_R_CANCELED: + case ISC_R_SHUTTINGDOWN: + dns_remote_reset(&zone->primaries, false); + break; + default: next_primary: /*