diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index 1f7d3cccd4..9cb714b022 100644 --- a/lib/dns/include/dns/zone.h +++ b/lib/dns/include/dns/zone.h @@ -1555,7 +1555,7 @@ dns_zone_getprimaryaddr(dns_zone_t *zone); */ isc_time_t -dns_zone_getxfrintime(const dns_zone_t *zone); +dns_zone_getxfrintime(dns_zone_t *zone); /*%< * Get the start time of the zone's latest major step before an incoming zone * transfer is initiated. The time is set to the current time before the diff --git a/lib/dns/zone.c b/lib/dns/zone.c index c7472ce150..43c97188de 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -18199,10 +18199,16 @@ dns_zone_getprimaryaddr(dns_zone_t *zone) { } isc_time_t -dns_zone_getxfrintime(const dns_zone_t *zone) { +dns_zone_getxfrintime(dns_zone_t *zone) { + isc_time_t xfrintime; + REQUIRE(DNS_ZONE_VALID(zone)); - return (zone->xfrintime); + LOCK_ZONE(zone); + xfrintime = zone->xfrintime; + UNLOCK_ZONE(zone); + + return (xfrintime); } static void