From: Matthijs Mekking Date: Fri, 20 Mar 2026 10:13:27 +0000 (+0100) Subject: Lock zone when incrementing statistics X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a0b419991045f2f60b3e7e1e71cefe8654fa673;p=thirdparty%2Fbind9.git Lock zone when incrementing statistics dns__zone_stats_increment() requires the zone to be locked. This was not always the case. This commit fixes that. --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index fe565033bfc..27c5ffcf067 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -13485,10 +13485,10 @@ dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from, { /* Accept notify. */ } else if (i >= dns_remote_count(&zone->primaries)) { - UNLOCK_ZONE(zone); dns_zone_logc(zone, DNS_LOGCATEGORY_XFER_IN, ISC_LOG_INFO, "refused notify from non-primary: %s", fromtext); dns__zone_stats_increment(zone, dns_zonestatscounter_notifyrej); + UNLOCK_ZONE(zone); return DNS_R_REFUSED; }