[v9_9] Minor improvements to code handling managed keys

4812.	[bug]		Minor improvements to stability and consistency of code
			handling managed keys. [RT #46468]

(cherry picked from commit 54c1627c6f)
This commit is contained in:
Michał Kępień
2017-11-09 15:21:04 +01:00
parent ec547a9877
commit c799c10ffe
3 changed files with 9 additions and 6 deletions
+5 -5
View File
@@ -9126,7 +9126,7 @@ zone_refreshkeys(dns_zone_t *zone) {
}
/* Acceptance timer expired? */
if (kd.addhd < now)
if (kd.addhd <= now)
timer = kd.addhd;
/* Or do we just need to refresh the keyset? */
@@ -9228,12 +9228,10 @@ zone_refreshkeys(dns_zone_t *zone) {
isc_time_formattimestamp(&zone->refreshkeytime, timebuf, 80);
dns_zone_log(zone, ISC_LOG_DEBUG(1), "retry key refresh: %s",
timebuf);
if (!fetching)
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESHING);
}
UNLOCK_ZONE(zone);
if (!fetching)
DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESHING);
dns_diff_clear(&diff);
if (ver != NULL) {
@@ -9242,6 +9240,8 @@ zone_refreshkeys(dns_zone_t *zone) {
}
dns_db_detach(&db);
UNLOCK_ZONE(zone);
INSIST(ver == NULL);
}