]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix keymgr bug wrt setting the next time
authorMatthijs Mekking <matthijs@isc.org>
Tue, 4 Mar 2025 16:18:36 +0000 (17:18 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 20 Mar 2025 10:12:16 +0000 (10:12 +0000)
Only set the next time the keymgr should run if the value is non zero.
Otherwise we default back to one hour. This may happen if there is one
or more key with an unlimited lifetime.

lib/dns/keymgr.c

index 6f7e568b439d7cfb3c6c0fd2e56e966db73780ae..50c56435b3e50928b688be8059c4067d8471b4cd 100644 (file)
@@ -1777,7 +1777,9 @@ keymgr_key_rollover(dns_kasp_key_t *kaspkey, dns_dnsseckey_t *active_key,
                if (prepub == 0 || prepub > now) {
                        /* No need to start rollover now. */
                        if (*nexttime == 0 || prepub < *nexttime) {
-                               *nexttime = prepub;
+                               if (prepub > 0) {
+                                       *nexttime = prepub;
+                               }
                        }
                        return ISC_R_SUCCESS;
                }