]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
If prepub > retire, prepub now
authorMatthijs Mekking <matthijs@isc.org>
Thu, 14 May 2020 13:36:13 +0000 (15:36 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Tue, 2 Jun 2020 08:00:53 +0000 (10:00 +0200)
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.

lib/dns/keymgr.c

index 87abec4e704c7e8a819edaaa6b52144a24f69ca5..e5f1860c25e33ea7a0c44c9cc7c51181c29b53a0 100644 (file)
@@ -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);
 }