From: Matthijs Mekking Date: Thu, 14 May 2020 13:36:13 +0000 (+0200) Subject: If prepub > retire, prepub now X-Git-Tag: v9.17.2~38^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c08d0f7dd68811bbcacab93555959e30e3aada38;p=thirdparty%2Fbind9.git If prepub > retire, prepub now Catch a case where if the prepublication time of the successor key is later than the retire time of the predecessor. If that is the case we should prepublish as soon as possible, a.k.a. now. --- diff --git a/lib/dns/keymgr.c b/lib/dns/keymgr.c index 87abec4e704..e5f1860c25e 100644 --- a/lib/dns/keymgr.c +++ b/lib/dns/keymgr.c @@ -287,6 +287,10 @@ keymgr_prepublication_time(dns_dnsseckey_t *key, dns_kasp_t *kasp, /* * Publish successor 'prepub' time before the 'retire' time of 'key'. */ + if (prepub > retire) { + /* We should have already prepublished the new key. */ + return (now); + } return (retire - prepub); }