]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Implement a new 'notify-defer' configuration option
authorAram Sargsyan <aram@isc.org>
Tue, 22 Apr 2025 13:33:48 +0000 (13:33 +0000)
committerAram Sargsyan <aram@isc.org>
Fri, 16 May 2025 09:58:48 +0000 (09:58 +0000)
This new option sets the delay, in seconds, to wait before sending
a set of NOTIFY messages for a zone. Whenever a NOTIFY message is
ready to be sent, sending will be deferred for this duration.

(cherry picked from commit e42d6b48108e6c879fb7d152194708b0cb6d62b0)

18 files changed:
bin/named/config.c
bin/named/server.c
bin/named/zoneconf.c
bin/tests/system/catz/ns1/named.conf.in
bin/tests/system/catz/ns2/named1.conf.in
bin/tests/system/catz/ns2/named2.conf.in
bin/tests/system/catz/setup.sh
bin/tests/system/catz/tests.sh
bin/tests/system/dyndb/driver/zone.c
doc/arm/reference.rst
doc/misc/mirror.zoneopt
doc/misc/options
doc/misc/primary.zoneopt
doc/misc/secondary.zoneopt
lib/dns/include/dns/zone.h
lib/dns/zone.c
lib/isccfg/namedconf.c
lib/ns/update.c

index c72ca9fdff29917155649350f07f698399fe8a68..62acda6b704e590f39e8c6cb2d82ebe28eb16a0c 100644 (file)
@@ -242,6 +242,7 @@ options {\n\
        min-transfer-rate-in 10240 5;\n\
        multi-master no;\n\
        notify yes;\n\
+       notify-defer 0;\n\
        notify-delay 5;\n\
        notify-to-soa no;\n\
        serial-update-method increment;\n\
index f5f449decc6e9ece7f208c1098dd58670e3ff805..8a73d1aca64bc4c2560e1387cbbf086e64f33042 100644 (file)
@@ -11245,7 +11245,7 @@ named_server_notifycommand(named_server_t *server, isc_lex_t *lex,
                return ISC_R_UNEXPECTEDEND;
        }
 
-       dns_zone_notify(zone);
+       dns_zone_notify(zone, true);
        dns_zone_detach(&zone);
        (void)putstr(text, msg);
        (void)putnull(text);
index fc650690a7ac57d034cb052573d1a1374717e749..ad0da4644da30b89cd0e7395f7a5cec6d9e0f6b7 100644 (file)
@@ -1449,6 +1449,11 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                INSIST(result == ISC_R_SUCCESS && obj != NULL);
                dns_zone_setnotifydelay(zone, cfg_obj_asuint32(obj));
 
+               obj = NULL;
+               result = named_config_get(maps, "notify-defer", &obj);
+               INSIST(result == ISC_R_SUCCESS && obj != NULL);
+               dns_zone_setnotifydefer(zone, cfg_obj_asuint32(obj));
+
                obj = NULL;
                result = named_config_get(maps, "check-sibling", &obj);
                INSIST(result == ISC_R_SUCCESS && obj != NULL);
index fdf8041f31927ed40556032336a8333721670784..2c04668280ed9aa19e4415e64de81ade436ff6ca 100644 (file)
@@ -69,6 +69,16 @@ view "default" {
 
        /* catalog5 is missing on purpose */
 
+       zone "catalog6.example" {
+               type primary;
+               file "catalog6.example.db";
+               allow-transfer { any; };
+               allow-update { any; };
+               also-notify { 10.53.0.2; };
+               notify explicit;
+               notify-defer 5;
+       };
+
        # No "version" property
        zone "catalog-bad1.example" {
                type primary;
index e16416d22d1cd9e95b3061e655e4c446ab3f08fa..2b8d05217a63b58c944cebe65cd6d657ae784a70 100644 (file)
@@ -62,6 +62,9 @@ view "default" {
 #T2            zone "catalog5.example"
 #T2                    min-update-interval 1s
 #T2                    default-primaries { 10.53.0.1; };
+               zone "catalog6.example"
+                       min-update-interval 1s
+                       default-primaries { 10.53.0.1; };
                zone "catalog-bad1.example"
                        default-masters { 10.53.0.1; }
                        min-update-interval 1s
@@ -129,6 +132,12 @@ view "default" {
                primaries { 10.53.0.1; };
        };
 
+       zone "catalog6.example" {
+               type secondary;
+               file "catalog6.example.db";
+               primaries { 10.53.0.1; };
+       };
+
        # When the following zone configuration is enabled, "dom3.example" should
        # already exist as a member of "catalog1.example", and named should be able
        # to deal with that situation (see GL #3911). Make sure that this duplicate
index ead45a85afa71b0c35f32c386e3b4e8b424e22f9..2255c6625efe2429497e92d60ecefc939028441a 100644 (file)
@@ -79,6 +79,12 @@ view "default" {
                primaries { 10.53.0.1; };
        };
 
+       zone "catalog6.example" {
+               type secondary;
+               file "catalog6.example.db";
+               primaries { 10.53.0.1; };
+       };
+
        # No "version" property
        zone "catalog-bad1.example" {
                type secondary;
index c33ce7f1c163755eeabc83acbb1bd91ef7acdbdf..c7e24fa1de548c726ea8abfe2664eca6f6afb8cb 100644 (file)
@@ -22,6 +22,8 @@ cp -f ns1/catalog.example.db.in ns1/catalog1.example.db
 cp -f ns3/catalog.example.db.in ns3/catalog2.example.db
 cp -f ns1/catalog.example.db.in ns1/catalog3.example.db
 cp -f ns1/catalog.example.db.in ns1/catalog4.example.db
+# catalog5 is missing on purpose
+cp -f ns1/catalog.example.db.in ns1/catalog6.example.db
 cp -f ns1/catalog.example.db.in ns1/catalog-tls.example.db
 cp -f ns4/catalog.example.db.in ns4/catalog-self.example.db
 
index 2dd89ff7f883f7256b9840ad981d0570c23764b6..5d8c7f36224869f4ae0812d64117b94cf828836f 100644 (file)
@@ -2669,6 +2669,133 @@ rndccmd 10.53.0.4 reload || ret=1
 if [ $ret -ne 0 ]; then echo_i "failed"; fi
 status=$((status + ret))
 
+##########################################################################
+
+nextpart ns2/named.run >/dev/null
+
+n=$((n + 1))
+echo_i "Adding a domain dom20.example. to primary via RNDC ($n)"
+ret=0
+# enough initial content for IXFR response when TXT record is added below
+echo "@ 3600 IN SOA . . 1 3600 3600 3600 3600" >ns1/dom20.example.db
+echo "@ 3600 IN NS invalid." >>ns1/dom20.example.db
+echo "foo 3600 IN TXT some content here" >>ns1/dom20.example.db
+echo "bar 3600 IN TXT some content here" >>ns1/dom20.example.db
+echo "xxx 3600 IN TXT some content here" >>ns1/dom20.example.db
+echo "yyy 3600 IN TXT some content here" >>ns1/dom20.example.db
+rndccmd 10.53.0.1 addzone dom20.example. in default '{ type primary; file "dom20.example.db"; allow-update { any; }; notify explicit; also-notify { 10.53.0.2; }; };' || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking that dom20.example. is now served by primary ($n)"
+ret=0
+wait_for_soa @10.53.0.1 dom20.example. dig.out.test$n || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "Adding domain dom20.example. to catalog6 zone ($n)"
+ret=0
+$NSUPDATE -d <<END >>nsupdate.out.test$n 2>&1 || ret=1
+    server 10.53.0.1 ${PORT}
+    update add dom20.zones.catalog6.example. 3600 IN PTR dom20.example.
+    send
+END
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "waiting for secondary to sync up ($n)"
+ret=0
+start=$(date +%s)
+wait_for_message ns2/named.run "catz: adding zone 'dom20.example' from catalog 'catalog6.example'" \
+  && wait_for_message ns2/named.run "transfer of 'dom20.example/IN/default' from 10.53.0.1#${PORT}: Transfer status: success" || ret=1
+end=$(date +%s)
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking that 'notify-defer 5;' worked ($n)"
+ret=0
+elapsed=$(($end - $start))
+[ $elapsed -ge 5 ] || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking that dom20.example. is served by secondary ($n)"
+ret=0
+wait_for_soa @10.53.0.2 dom20.example. dig.out.test$n || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+nextpart ns2/named.run >/dev/null
+
+n=$((n + 1))
+echo_i "Adding a domain dom21.example. to primary via RNDC ($n)"
+ret=0
+# enough initial content for IXFR response when TXT record is added below
+echo "@ 3600 IN SOA . . 1 3600 3600 3600 3600" >ns1/dom21.example.db
+echo "@ 3600 IN NS invalid." >>ns1/dom21.example.db
+echo "foo 3600 IN TXT some content here" >>ns1/dom21.example.db
+echo "bar 3600 IN TXT some content here" >>ns1/dom21.example.db
+echo "xxx 3600 IN TXT some content here" >>ns1/dom21.example.db
+echo "yyy 3600 IN TXT some content here" >>ns1/dom21.example.db
+rndccmd 10.53.0.1 addzone dom21.example. in default '{ type primary; file "dom21.example.db"; allow-update { any; }; notify explicit; also-notify { 10.53.0.2; }; };' || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking that dom21.example. is now served by primary ($n)"
+ret=0
+wait_for_soa @10.53.0.1 dom21.example. dig.out.test$n || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "Adding domain dom21.example. to catalog6 zone ($n)"
+ret=0
+$NSUPDATE -d <<END >>nsupdate.out.test$n 2>&1 || ret=1
+    server 10.53.0.1 ${PORT}
+    update add dom21.zones.catalog6.example. 3600 IN PTR dom21.example.
+    send
+END
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "Sending 'rndc notify catalog6.example.' to primary via RNDC ($n)"
+ret=0
+rndccmd 10.53.0.1 notify catalog6.example. || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "waiting for secondary to sync up ($n)"
+ret=0
+start=$(date +%s)
+wait_for_message ns2/named.run "catz: adding zone 'dom21.example' from catalog 'catalog6.example'" \
+  && wait_for_message ns2/named.run "transfer of 'dom21.example/IN/default' from 10.53.0.1#${PORT}: Transfer status: success" || ret=1
+end=$(date +%s)
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking that 'notify-defer 5;' was ignored because of implicit notify command ($n)"
+ret=0
+elapsed=$(($end - $start))
+[ $elapsed -lt 5 ] || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking that dom21.example. is served by secondary ($n)"
+ret=0
+wait_for_soa @10.53.0.2 dom21.example. dig.out.test$n || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
 ##########################################################################
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index d8c702236f95085e9f924d63bb84bf6983028038..ec9403ba64a8cfbac686a9d831326fd3ef1f7168 100644 (file)
@@ -219,7 +219,7 @@ load_zone(dns_zone_t *zone) {
        dns_zone_log(zone, ISC_LOG_INFO, "loaded serial %u", serial);
 
        if (zone_dynamic) {
-               dns_zone_notify(zone);
+               dns_zone_notify(zone, false);
        }
 
 cleanup:
index 75a46f0bff96564cb775fee6516c9f196cc401a6..17b3b6a1771cdc97503c59fc53f382062c26654b 100644 (file)
@@ -4670,6 +4670,29 @@ Tuning
    when resolving a client query, before terminating the query to avoid a
    CNAME loop. Valid values are 1 to 255. The default is 11.
 
+.. namedconf:statement:: notify-defer
+   :tags: transfer, zone
+   :short: Sets the defer time (in seconds) before sending NOTIFY messages for a zone.
+
+   This sets the delay, in seconds, to wait before sending a set of NOTIFY
+   messages for a zone. Whenever a NOTIFY message is ready to be sent, sending
+   will be deferred for this duration. This can be useful, for example, when
+   for some operation needs a catalog zone is updated with new member zones
+   before these member zones are actually ready to be tranferred. The delay can
+   be tuned for the catalog zone to an amount of time after which the member
+   zones are usually known to become ready. The default is 0 seconds.
+
+   .. warning::
+      This option is not to be confused with the :any:`notify-delay` option.
+
+   .. note::
+      An implicit :option:`rndc notify` command for a zone overrides the
+      effects of this option.
+
+   .. note::
+      This options is ignored for notifies sent during the :any:`dialup`
+      process.
+
 .. namedconf:statement:: notify-delay
    :tags: transfer, zone
    :short: Sets the delay (in seconds) between sending sets of NOTIFY messages for a zone.
@@ -4683,6 +4706,9 @@ Tuning
    The overall rate at which NOTIFY messages are sent for all zones is
    controlled by :any:`notify-rate`.
 
+   .. warning::
+      This option is not to be confused with the :any:`notify-defer` option.
+
 .. namedconf:statement:: max-rsa-exponent-size
    :tags: dnssec, query
    :short: Sets the maximum RSA exponent size (in bits) when validating.
index 45a4d36d5cc4bf77a440a39eb2c6c202b2b25216..4528338e20c94c8182c226baa5d5098e7081074c 100644 (file)
@@ -29,6 +29,7 @@ zone <string> [ <class> ] {
        min-transfer-rate-in <integer> <integer>;
        multi-master <boolean>;
        notify ( explicit | master-only | primary-only | <boolean> );
+       notify-defer <integer>;
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * );
        notify-source-v6 ( <ipv6_address> | * );
index c57d32446cb3a9dd1d8447f6400cb49524986ea5..ed925c83b0c829b9b50065b93af01caf9c2a0fbe 100644 (file)
@@ -217,6 +217,7 @@ options {
        no-case-compress { <address_match_element>; ... };
        nocookie-udp-size <integer>;
        notify ( explicit | master-only | primary-only | <boolean> );
+       notify-defer <integer>;
        notify-delay <integer>;
        notify-rate <integer>;
        notify-source ( <ipv4_address> | * );
@@ -507,6 +508,7 @@ view <string> [ <class> ] {
        no-case-compress { <address_match_element>; ... };
        nocookie-udp-size <integer>;
        notify ( explicit | master-only | primary-only | <boolean> );
+       notify-defer <integer>;
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * );
        notify-source-v6 ( <ipv6_address> | * );
index edb25741a928db518f3593fa252700606b67d159..02a178fd7e4195ea3ca8f8a6063c6ec2e579156b 100644 (file)
@@ -43,6 +43,7 @@ zone <string> [ <class> ] {
        max-types-per-name <integer>;
        max-zone-ttl ( unlimited | <duration> ); // deprecated
        notify ( explicit | master-only | primary-only | <boolean> );
+       notify-defer <integer>;
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * );
        notify-source-v6 ( <ipv6_address> | * );
index efae9ca461a3d1bb0100008b91f955d67e41b6ba..fc9a24dde99158b76e6096a17ce6930374570b2f 100644 (file)
@@ -41,6 +41,7 @@ zone <string> [ <class> ] {
        min-transfer-rate-in <integer> <integer>;
        multi-master <boolean>;
        notify ( explicit | master-only | primary-only | <boolean> );
+       notify-defer <integer>;
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * );
        notify-source-v6 ( <ipv6_address> | * );
index e7e3d909a8f07639cc635e55a4800b36e39cbb3f..57ff194c2b83649d402cf80b5d2da0aaa18f57f6 100644 (file)
@@ -1375,9 +1375,10 @@ dns_zone_getredirecttype(dns_zone_t *zone);
  */
 
 void
-dns_zone_notify(dns_zone_t *zone);
+dns_zone_notify(dns_zone_t *zone, bool nodefer);
 /*%<
- * Generate notify events for this zone.
+ * Generate notify events for this zone. If 'nodefer' is true, the
+ * 'notify-defer' configuration option is ingored.
  *
  * Requires:
  *\li  'zone' to be a valid zone.
@@ -2233,6 +2234,16 @@ dns_zone_setcheckns(dns_zone_t *zone, dns_checknsfunc_t checkns);
  *     'zone' to be a valid zone.
  */
 
+void
+dns_zone_setnotifydefer(dns_zone_t *zone, uint32_t defer);
+/*%<
+ * Set the wait/defer time (in seconds) before notify messages are sent when
+ * they are ready.
+ *
+ * Requires:
+ *     'zone' to be valid.
+ */
+
 void
 dns_zone_setnotifydelay(dns_zone_t *zone, uint32_t delay);
 /*%<
index fce460d88eb94ba8e6c70d91f9f13280342a5fac..d539d4695b5d48060427d8bf50ae28202fd1ccaf 100644 (file)
@@ -401,6 +401,7 @@ struct dns_zone {
        dns_stats_t *rcvquerystats;
        dns_stats_t *dnssecsignstats;
        uint32_t notifydelay;
+       uint32_t notifydefer;
        dns_isselffunc_t isself;
        void *isselfarg;
 
@@ -568,7 +569,12 @@ typedef enum {
                                                      * notify due to the zone
                                                      * just being loaded for
                                                      * the first time. */
-       DNS_ZONEFLG_FIRSTREFRESH = 0x100000000U, /*%< First refresh pending */
+       DNS_ZONEFLG_NOTIFYNODEFER = 0x100000000U,    /*%< ignore the
+                                                     * notify-defer option. */
+       DNS_ZONEFLG_NOTIFYDEFERRED = 0x200000000U,   /*%< notify was deferred
+                                                     * according to the
+                                                     * notify-defer option. */
+       DNS_ZONEFLG_FIRSTREFRESH = 0x400000000U, /*%< First refresh pending */
        DNS_ZONEFLG___MAX = UINT64_MAX, /* trick to make the ENUM 64-bit wide */
 } dns_zoneflg_t;
 
@@ -1055,6 +1061,19 @@ static const char *dbargv_default[] = { ZONEDB_DEFAULT };
                }                                                            \
        } while (0)
 
+#define DNS_ZONE_TIME_SUBTRACT(a, b, c)                                      \
+       do {                                                                 \
+               isc_interval_t _i;                                           \
+               isc_interval_set(&_i, (b), 0);                               \
+               if (isc_time_subtract((a), &_i, (c)) != ISC_R_SUCCESS) {     \
+                       dns_zone_log(zone, ISC_LOG_WARNING,                  \
+                                    "epoch approaching: upgrade required: " \
+                                    "isc_time_subtract() failed");          \
+                       isc_interval_set(&_i, (b) / 2, 0);                   \
+                       (void)isc_time_subtract((a), &_i, (c));              \
+               }                                                            \
+       } while (0)
+
 typedef struct nsec3param nsec3param_t;
 struct nsec3param {
        dns_rdata_nsec3param_t rdata;
@@ -11167,6 +11186,17 @@ zone_maintenance(dns_zone_t *zone) {
         * primaries after.
         */
        LOCK_ZONE(zone);
+       if (zone->notifydefer != 0 &&
+           !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOTIFYNODEFER) &&
+           !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOTIFYDEFERRED))
+       {
+               if (isc_time_compare(&now, &zone->notifytime) > 0) {
+                       zone->notifytime = now;
+               }
+               DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOTIFYDEFERRED);
+               DNS_ZONE_TIME_ADD(&zone->notifytime, zone->notifydefer,
+                                 &zone->notifytime);
+       }
        notify = (zone->type == dns_zone_secondary ||
                  zone->type == dns_zone_mirror) &&
                 (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
@@ -12694,14 +12724,27 @@ cleanup:
 }
 
 void
-dns_zone_notify(dns_zone_t *zone) {
+dns_zone_notify(dns_zone_t *zone, bool nodefer) {
        isc_time_t now;
 
        REQUIRE(DNS_ZONE_VALID(zone));
 
        LOCK_ZONE(zone);
        DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY);
-
+       if (nodefer) {
+               if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOTIFYDEFERRED)) {
+                       /*
+                        * We have previously deferred the notify, but we have a
+                        * new request not to defer it. Reverse the deferring
+                        * operation.
+                        */
+                       DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NOTIFYDEFERRED);
+                       DNS_ZONE_TIME_SUBTRACT(&zone->notifytime,
+                                              zone->notifydefer,
+                                              &zone->notifytime);
+               }
+               DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOTIFYNODEFER);
+       }
        now = isc_time_now();
        zone_settimer(zone, &now);
        UNLOCK_ZONE(zone);
@@ -12733,8 +12776,10 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
 
        LOCK_ZONE(zone);
        startup = !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY);
-       DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY);
-       DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY);
+       DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY |
+                                      DNS_ZONEFLG_NEEDSTARTUPNOTIFY |
+                                      DNS_ZONEFLG_NOTIFYNODEFER |
+                                      DNS_ZONEFLG_NOTIFYDEFERRED);
        notifytype = zone->notifytype;
        DNS_ZONE_TIME_ADD(now, zone->notifydelay, &zone->notifytime);
        UNLOCK_ZONE(zone);
@@ -19833,7 +19878,7 @@ dns_zone_dialup(dns_zone_t *zone) {
                      DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DIALREFRESH));
 
        if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DIALNOTIFY)) {
-               dns_zone_notify(zone);
+               dns_zone_notify(zone, true);
        }
        if (zone->type != dns_zone_primary &&
            dns_remote_addresses(&zone->primaries) != NULL &&
@@ -20170,6 +20215,15 @@ dns_zone_setisself(dns_zone_t *zone, dns_isselffunc_t isself, void *arg) {
        UNLOCK_ZONE(zone);
 }
 
+void
+dns_zone_setnotifydefer(dns_zone_t *zone, uint32_t defer) {
+       REQUIRE(DNS_ZONE_VALID(zone));
+
+       LOCK_ZONE(zone);
+       zone->notifydefer = defer;
+       UNLOCK_ZONE(zone);
+}
+
 void
 dns_zone_setnotifydelay(dns_zone_t *zone, uint32_t delay) {
        REQUIRE(DNS_ZONE_VALID(zone));
index 3daaeae9111c653b019921addf1fc30121c737c3..ff0cc9da42ac042db78cb993c59161c6845186f0 100644 (file)
@@ -2496,6 +2496,8 @@ static cfg_clausedef_t zone_clauses[] = {
          CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
        { "notify", &cfg_type_notifytype,
          CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
+       { "notify-defer", &cfg_type_uint32,
+         CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
        { "notify-delay", &cfg_type_uint32,
          CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
        { "notify-source", &cfg_type_sockaddr4wild,
index 51d7f2fc0401d0f7baa91fcd9445a349d30ddd7f..f53255f66aabdc44087b38505da62009e30807f0 100644 (file)
@@ -3431,7 +3431,7 @@ update_action(void *arg) {
                /*
                 * Notify secondaries of the change we just made.
                 */
-               dns_zone_notify(zone);
+               dns_zone_notify(zone, false);
        } else {
                update_log(client, zone, LOGLEVEL_DEBUG, "redundant request");
                dns_db_closeversion(db, &ver, true);