Fix keymgr bug wrt setting the next time

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.
This commit is contained in:
Matthijs Mekking
2025-03-04 17:18:36 +01:00
parent 8c9d2eb2bf
commit 6c6b8796d3

View 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;
}