]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Only log "new successor in ..." if prepub != 0
authorMatthijs Mekking <matthijs@isc.org>
Tue, 10 May 2022 08:25:27 +0000 (10:25 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 31 May 2022 15:17:05 +0000 (17:17 +0200)
If 'prepub' is 0, this has the special meaning that no rollover is
scheduled. If so, don't log "new successor in x seconds".

(cherry picked from commit 955a69109ef21e18466e62100eecd6babbc27e90)

lib/dns/keymgr.c

index ddd9a9a58395b89b908ccf9883a13f88d99b522c..990c442ca1320c677e32919af36dfe6187153886 100644 (file)
@@ -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;