From 1a0b419991045f2f60b3e7e1e71cefe8654fa673 Mon Sep 17 00:00:00 2001 From: Matthijs Mekking Date: Fri, 20 Mar 2026 11:13:27 +0100 Subject: [PATCH] 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. --- lib/dns/zone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index fe565033bf..27c5ffcf06 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; }