From: Evan Hunt Date: Fri, 22 Mar 2013 21:14:59 +0000 (-0700) Subject: [master] slaves notify before writing to disk X-Git-Tag: v9.10.0a1~448^2~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e57a83b57659ae1d4f755a7841b519c047ec7f75;p=thirdparty%2Fbind9.git [master] slaves notify before writing to disk 3537. [tuning] Slave zones, when updated, now send NOTIFY messages to peers before being dumped to disk rather than after. [RT #27242] --- diff --git a/CHANGES b/CHANGES index 83f6e74af23..3efca1e1136 100644 --- 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., diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 27af000884c..b6c56f1629f 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -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)