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 260012e899
commit 35ba1bb55e

View File

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