]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
log that a zone is expired after setting the flag
authorColin Vidal <colin@isc.org>
Mon, 3 Nov 2025 16:31:26 +0000 (17:31 +0100)
committerColin Vidal <colin@isc.org>
Mon, 3 Nov 2025 16:34:25 +0000 (17:34 +0100)
When a (secondary) zone is expired, the log message `<zone> expired` is
printed and the flag `DNS_ZONEFLG_EXPIRED` is set. Change the order by
setting the expired flag first, then printing the log.

This should fixes (rare but persistent) timing-related CI error when the
EDE 24 tests expect the zone to be expired (from the log) and
immediately after request and expect an EDE 24 error. (In some rare
cases, the server was still answering the response).

lib/dns/zone.c

index a196d5b96cbcdf7a5c5a82143d8f963da4eacd09..fdba710f47db0ce1b662c74fef2f18dca9538c60 100644 (file)
@@ -11848,13 +11848,13 @@ zone_expire(dns_zone_t *zone) {
 
        REQUIRE(LOCKED_ZONE(zone));
 
-       dns_zone_log(zone, ISC_LOG_WARNING, "expired");
-
        DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_EXPIRED);
        zone->refresh = DNS_ZONE_DEFAULTREFRESH;
        zone->retry = DNS_ZONE_DEFAULTRETRY;
        DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_HAVETIMERS);
 
+       dns_zone_log(zone, ISC_LOG_WARNING, "expired");
+
        /*
         * An RPZ zone has expired; before unloading it, we must
         * first remove it from the RPZ summary database. The