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.

(cherry picked from commit 6c6b8796d3)
This commit is contained in:
Matthijs Mekking
2025-03-04 17:18:36 +01:00
parent ac8efcbf14
commit 3de8fa8709

View File

@@ -1778,7 +1778,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;
}