]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2836. [bug] Keys that were scheduled to become active could
authorEvan Hunt <each@isc.org>
Sat, 9 Jan 2010 17:09:00 +0000 (17:09 +0000)
committerEvan Hunt <each@isc.org>
Sat, 9 Jan 2010 17:09:00 +0000 (17:09 +0000)
be delayed. [RT #20874]

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index d9a1cbe9233f06afd30626c036003594b218ef65..cb79cfef7a8063fd0fcc7c2b79b53edb2e853ceb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2836.  [bug]           Keys that were scheduled to become active could
+                       be delayed. [RT #20874]
+
 2835.  [bug]           Key inactivity dates were inadvertently stored in
                        the private key file with the outdated tag
                        "Unpublish" rather than "Inactive".  This has been
index 644a8419a74cdbb676a18ee6ddc921d8329d49b2..2148b7a5fe6c589d0d34eef74d75897ec116ab18 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.549 2009/12/30 23:49:12 tbox Exp $ */
+/* $Id: zone.c,v 1.550 2010/01/09 17:09:00 each Exp $ */
 
 /*! \file */
 
@@ -13747,8 +13747,8 @@ zone_rekey(dns_zone_t *zone) {
 
                result = dns_dnssec_updatekeys(&dnskeys, &keys, &rmkeys,
                                               &zone->origin, ttl, &diff,
-                                              ISC_TF(!check_ksk),
-                                              mctx, logmsg);
+                                               ISC_TF(!check_ksk),
+                                               mctx, logmsg);
 
                /* Keys couldn't be updated for some reason; try again later. */
                if (result != ISC_R_SUCCESS) {
@@ -13773,6 +13773,19 @@ zone_rekey(dns_zone_t *zone) {
 
        dns_db_closeversion(db, &ver, commit);
 
+       /* See if any pre-existing keys have newly become active */
+       if (!commit) {
+               for (key = ISC_LIST_HEAD(dnskeys);
+                    key != NULL;
+                    key = ISC_LIST_NEXT(key, link)) {
+                       if (key->first_sign) {
+                               commit = ISC_TRUE;
+                               break;
+                       }
+               }
+       }
+
+       /* Update signatures */
        if (commit) {
                LOCK_ZONE(zone);
                DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOTIFYRESIGN);