]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not automatically restart a canceled zone transfer
authorAram Sargsyan <aram@isc.org>
Tue, 11 Jun 2024 10:53:06 +0000 (10:53 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 1 Aug 2024 10:43:47 +0000 (10:43 +0000)
If a zone transfer is canceled there is no need to try the
next primary or retry with AXFR.

lib/dns/xfrin.c
lib/dns/zone.c

index 02488ebaed188da4cf2855f9a5ce369f97949407..745c7f58a7c210eb8a9c963fc8ebcb3baba7bc90 100644 (file)
@@ -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
                                 */
index ce803abf0bfa98904edd0f2f42fd87d3d4017cc3..24c63aa720c29f3a48707860df4482dff023b4d3 100644 (file)
@@ -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:
                /*