]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Mark a primary as unreachable on timed out in xfin
authorMark Andrews <marka@isc.org>
Wed, 19 Jul 2023 23:07:50 +0000 (09:07 +1000)
committerMark Andrews <marka@isc.org>
Fri, 21 Jul 2023 23:06:42 +0000 (09:06 +1000)
When a primary server is not responding, mark it as temporarialy
unreachable.  This will prevent too many zones queuing up on a
unreachable server and allow the refresh process to move onto
the next primary sooner once it has been so marked.

lib/dns/xfrin.c

index a54d0d84a266b94ff526b6ba7efc3a8d3f8b3a13..1e3ccaf8b51aed275143085917071078750a3db9 100644 (file)
@@ -1520,12 +1520,22 @@ failure:
 static void
 xfrin_timeout(isc_task_t *task, isc_event_t *event) {
        dns_xfrin_ctx_t *xfr = (dns_xfrin_ctx_t *)event->ev_arg;
+       dns_zonemgr_t *zmgr = NULL;
 
        REQUIRE(VALID_XFRIN(xfr));
 
        UNUSED(task);
 
        isc_event_free(&event);
+
+       zmgr = dns_zone_getmgr(xfr->zone);
+       if (zmgr != NULL) {
+               isc_time_t now;
+               TIME_NOW(&now);
+               dns_zonemgr_unreachableadd(zmgr, &xfr->masteraddr,
+                                          &xfr->sourceaddr, &now);
+       }
+
        /*
         * This will log "giving up: timeout".
         */