From: Matthijs Mekking Date: Tue, 10 May 2022 08:25:27 +0000 (+0200) Subject: Only log "new successor in ..." if prepub != 0 X-Git-Tag: v9.19.2~12^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=955a69109ef21e18466e62100eecd6babbc27e90;p=thirdparty%2Fbind9.git Only log "new successor in ..." if prepub != 0 If 'prepub' is 0, this has the special meaning that no rollover is scheduled. If so, don't log "new successor in x seconds". --- diff --git a/lib/dns/keymgr.c b/lib/dns/keymgr.c index 4d9ccfbd9e8..a75121fd394 100644 --- a/lib/dns/keymgr.c +++ b/lib/dns/keymgr.c @@ -1669,7 +1669,7 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key, */ prepub = keymgr_prepublication_time(active_key, kasp, lifetime, now); - if (prepub == 0 || prepub > now) { + if (prepub > now) { if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) { dst_key_format(active_key->key, keystr, sizeof(keystr)); @@ -1682,7 +1682,8 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key, keystr, keymgr_keyrole(active_key->key), dns_kasp_getname(kasp), (prepub - now)); } - + } + if (prepub == 0 || prepub > now) { /* No need to start rollover now. */ if (*nexttime == 0 || prepub < *nexttime) { *nexttime = prepub;