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

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 386260f6d2f0b4b97dcae4555e7f61c2428f498f..0d4e29ba77e72e00f04f5ca86a4ef766d435d883 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]
+
 3535.  [bug]           Minor win32 cleanups. [RT #32962]
 
 3534.  [bug]           Extra text after an embedded NULL was ignored when
index b9bd9328eb5ffa01810de7d80b4476526f0b8a32..0476e4a3de0275d8d4d573c330838a88f2f391ee 100644 (file)
@@ -8135,6 +8135,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?
         */
@@ -8164,6 +8172,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?
         */
@@ -8187,12 +8208,6 @@ zone_maintenance(dns_zone_t *zone) {
        switch (zone->type) {
        case dns_zone_master:
        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?
                 */
@@ -8206,7 +8221,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)