From: Colin Vidal Date: Mon, 3 Nov 2025 16:31:26 +0000 (+0100) Subject: log that a zone is expired after setting the flag X-Git-Tag: v9.21.15~10^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4851fcdb7d8de44857c722fd852b740290583f5;p=thirdparty%2Fbind9.git log that a zone is expired after setting the flag When a (secondary) zone is expired, the log message ` 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). --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index a196d5b96cb..fdba710f47d 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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