]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] slaves notify before writing to disk
authorEvan Hunt <each@isc.org>
Fri, 22 Mar 2013 21:14:59 +0000 (14:14 -0700)
committerEvan Hunt <each@isc.org>
Fri, 22 Mar 2013 21:14:59 +0000 (14:14 -0700)
3537. [tuning] Slave zones, when updated, now send NOTIFY messages
to peers before being dumped to disk rather than
after. [RT #27242]

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 83f6e74af23debb503aaf9db6dac1195444ec479..3efca1e1136fe8b71b59b46a779e050c195915b2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3537.  [tuning]        Slave zones, when updated, now send NOTIFY messages
+                       to peers before being dumped to disk rather than
+                       after. [RT #27242]
+
 3536.  [func]          Add support for setting Differentiated Services Code
                        Point (DSCP) values in named.  Most configuration
                        options which take a "port" option (e.g.,
index 27af000884c8c5a01cf6dca6791bedf447ee6cf4..b6c56f1629f1d2a6234317b474c4dc6e0e4347f0 100644 (file)
@@ -8938,6 +8938,14 @@ zone_maintenance(dns_zone_t *zone) {
                break;
        }
 
+       /*
+        * Slaves send notifies before backing up to disk, masters after.
+        */
+       if (zone->type == dns_zone_slave &&
+           DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) &&
+           isc_time_compare(&now, &zone->notifytime) >= 0)
+               zone_notify(zone, &now);
+
        /*
         * Do we need to consolidate the backing store?
         */
@@ -8968,6 +8976,19 @@ zone_maintenance(dns_zone_t *zone) {
                break;
        }
 
+       /*
+        * Master/redirect zones send notifies now, if needed
+        */
+       switch (zone->type) {
+       case dns_zone_master:
+       case dns_zone_redirect:
+               if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) &&
+                   isc_time_compare(&now, &zone->notifytime) >= 0)
+                       zone_notify(zone, &now);
+       default:
+               break;
+       }
+
        /*
         * Do we need to refresh keys?
         */
@@ -8992,12 +9013,6 @@ zone_maintenance(dns_zone_t *zone) {
        case dns_zone_master:
        case dns_zone_redirect:
        case dns_zone_slave:
-               /*
-                * Do we need to send out notify messages?
-                */
-               if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) &&
-                   isc_time_compare(&now, &zone->notifytime) >= 0)
-                       zone_notify(zone, &now);
                /*
                 * Do we need to sign/resign some RRsets?
                 */
@@ -9011,7 +9026,7 @@ zone_maintenance(dns_zone_t *zone) {
                        isc_time_compare(&now, &zone->nsec3chaintime) >= 0)
                        zone_nsec3chain(zone);
                /*
-                * Do we need to issue a key expiry warning.
+                * Do we need to issue a key expiry warning?
                 */
                if (!isc_time_isepoch(&zone->keywarntime) &&
                    isc_time_compare(&now, &zone->keywarntime) >= 0)