]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add "primary-only" as a synonym for "master-only"
authorEvan Hunt <each@isc.org>
Wed, 17 Jun 2020 09:45:07 +0000 (02:45 -0700)
committerMichał Kępień <michal@isc.org>
Tue, 12 Jan 2021 14:21:14 +0000 (15:21 +0100)
update the "notify" option to use RFC 8499 terminology as well.

(cherry picked from commit 424a3cf3ccb0c3b4aaf2f8e9af57432acadf2112)

14 files changed:
bin/named/named.conf.rst
bin/named/zoneconf.c
bin/tests/system/checkconf/good.conf
doc/misc/master.zoneopt
doc/misc/master.zoneopt.rst
doc/misc/mirror.zoneopt
doc/misc/mirror.zoneopt.rst
doc/misc/options
doc/misc/options.active
doc/misc/options.grammar.rst
doc/misc/slave.zoneopt
doc/misc/slave.zoneopt.rst
lib/bind9/check.c
lib/isccfg/namedconf.c

index 4e3429ac26736c76256476f0efc6b21a6e3ac3af..6f03f1133a5faa88fa08e9ed90a320bd1e0e6b6c 100644 (file)
@@ -325,7 +325,7 @@ OPTIONS
        new-zones-directory quoted_string;
        no-case-compress { address_match_element; ... };
        nocookie-udp-size integer;
-       notify ( explicit | master-only | boolean );
+       notify ( explicit | master-only | primary-only | boolean );
        notify-delay integer;
        notify-rate integer;
        notify-source ( ipv4_address | * ) [ port ( integer | * ) ] [
@@ -689,7 +689,7 @@ VIEW
        new-zones-directory quoted_string;
        no-case-compress { address_match_element; ... };
        nocookie-udp-size integer;
-       notify ( explicit | master-only | boolean );
+       notify ( explicit | master-only | primary-only | boolean );
        notify-delay integer;
        notify-source ( ipv4_address | * ) [ port ( integer | * ) ] [
            dscp integer ];
@@ -885,7 +885,7 @@ VIEW
                min-refresh-time integer;
                min-retry-time integer;
                multi-master boolean;
-               notify ( explicit | master-only | boolean );
+               notify ( explicit | master-only | primary-only | boolean );
                notify-delay integer;
                notify-source ( ipv4_address | * ) [ port ( integer | *
                    ) ] [ dscp integer ];
@@ -991,7 +991,7 @@ ZONE
        min-refresh-time integer;
        min-retry-time integer;
        multi-master boolean;
-       notify ( explicit | master-only | boolean );
+       notify ( explicit | master-only | primary-only | boolean );
        notify-delay integer;
        notify-source ( ipv4_address | * ) [ port ( integer | * ) ] [
            dscp integer ];
index 4bc8c199edff1878011907c9c9672e03e3e91246..3b1186ad001f0fe2f4624a85cecae2d60672082d 100644 (file)
@@ -1249,10 +1249,12 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
                                notifytype = dns_notifytype_no;
                        }
                } else {
-                       const char *notifystr = cfg_obj_asstring(obj);
-                       if (strcasecmp(notifystr, "explicit") == 0) {
+                       const char *str = cfg_obj_asstring(obj);
+                       if (strcasecmp(str, "explicit") == 0) {
                                notifytype = dns_notifytype_explicit;
-                       } else if (strcasecmp(notifystr, "master-only") == 0) {
+                       } else if (strcasecmp(str, "master-only") == 0 ||
+                                  strcasecmp(str, "primary-only") == 0)
+                       {
                                notifytype = dns_notifytype_masteronly;
                        } else {
                                INSIST(0);
index a07e7c2914212441ab492cb21d05a7986f5b64a4..117143ad2933f5d191f095f73acd3c5a9f560e98 100644 (file)
@@ -165,6 +165,7 @@ view "third" {
                masters {
                        1.2.3.4;
                };
+               notify primary-only;
        };
 };
 view "fourth" {
index 527e8b39621a4f154fed0092257dff27dd215e1d..bb3d6281bd30a0b90c9879b26ac94bbb69ee2f00 100644 (file)
@@ -40,7 +40,7 @@ zone <string> [ <class> ] {
        max-transfer-idle-out <integer>;
        max-transfer-time-out <integer>;
        max-zone-ttl ( unlimited | <duration> );
-       notify ( explicit | master-only | <boolean> );
+       notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
        notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
index 94e2fbf4fe7a1c34010415b0182ebaedb7cac827..4a2bbed75f8a0dbb085f568db853f198f5d449ab 100644 (file)
@@ -42,7 +42,7 @@
        max-transfer-idle-out <integer>;
        max-transfer-time-out <integer>;
        max-zone-ttl ( unlimited | <duration> );
-       notify ( explicit | master-only | <boolean> );
+       notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
        notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
index 5c65912f2cfdae5c0759a6e0bec9ba5950277495..d403bfd1b872bf2564b46cd15c066b81e3655c14 100644 (file)
@@ -27,7 +27,7 @@ zone <string> [ <class> ] {
        min-refresh-time <integer>;
        min-retry-time <integer>;
        multi-master <boolean>;
-       notify ( explicit | master-only | <boolean> );
+       notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
        notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
index 85151538e35b690bf0f4d03a7432d9348686f16b..a52235e8389f6eb11e17e8d18ccead5036b5aaf8 100644 (file)
@@ -29,7 +29,7 @@
        min-refresh-time <integer>;
        min-retry-time <integer>;
        multi-master <boolean>;
-       notify ( explicit | master-only | <boolean> );
+       notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
        notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
index 881bd4cec2ca8468795ba3436e3ae8f10e840ff6..f98abd8e78c14a48270c8f5b74bce62fac044683 100644 (file)
@@ -273,7 +273,7 @@ options {
         no-case-compress { <address_match_element>; ... };
         nocookie-udp-size <integer>;
         nosit-udp-size <integer>; // obsolete
-        notify ( explicit | master-only | <boolean> );
+        notify ( explicit | master-only | primary-only | <boolean> );
         notify-delay <integer>;
         notify-rate <integer>;
         notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
@@ -635,7 +635,7 @@ view <string> [ <class> ] {
         no-case-compress { <address_match_element>; ... };
         nocookie-udp-size <integer>;
         nosit-udp-size <integer>; // obsolete
-        notify ( explicit | master-only | <boolean> );
+        notify ( explicit | master-only | primary-only | <boolean> );
         notify-delay <integer>;
         notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
             dscp <integer> ];
@@ -847,7 +847,7 @@ view <string> [ <class> ] {
                 min-refresh-time <integer>;
                 min-retry-time <integer>;
                 multi-master <boolean>;
-                notify ( explicit | master-only | <boolean> );
+                notify ( explicit | master-only | primary-only | <boolean> );
                 notify-delay <integer>;
                 notify-source ( <ipv4_address> | * ) [ port ( <integer> | *
                     ) ] [ dscp <integer> ];
@@ -955,7 +955,7 @@ zone <string> [ <class> ] {
         min-refresh-time <integer>;
         min-retry-time <integer>;
         multi-master <boolean>;
-        notify ( explicit | master-only | <boolean> );
+        notify ( explicit | master-only | primary-only | <boolean> );
         notify-delay <integer>;
         notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
             dscp <integer> ];
index 737efd1449b4502511f81b60b937a0740e0826b2..ee86d9a197047f5798ee1ceffee1c14e167b1191 100644 (file)
@@ -243,7 +243,7 @@ options {
         new-zones-directory <quoted_string>;
         no-case-compress { <address_match_element>; ... };
         nocookie-udp-size <integer>;
-        notify ( explicit | master-only | <boolean> );
+        notify ( explicit | master-only | primary-only | <boolean> );
         notify-delay <integer>;
         notify-rate <integer>;
         notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
@@ -570,7 +570,7 @@ view <string> [ <class> ] {
         new-zones-directory <quoted_string>;
         no-case-compress { <address_match_element>; ... };
         nocookie-udp-size <integer>;
-        notify ( explicit | master-only | <boolean> );
+        notify ( explicit | master-only | primary-only | <boolean> );
         notify-delay <integer>;
         notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
             dscp <integer> ];
@@ -766,7 +766,7 @@ view <string> [ <class> ] {
                 min-refresh-time <integer>;
                 min-retry-time <integer>;
                 multi-master <boolean>;
-                notify ( explicit | master-only | <boolean> );
+                notify ( explicit | master-only | primary-only | <boolean> );
                 notify-delay <integer>;
                 notify-source ( <ipv4_address> | * ) [ port ( <integer> | *
                     ) ] [ dscp <integer> ];
@@ -867,7 +867,7 @@ zone <string> [ <class> ] {
         min-refresh-time <integer>;
         min-retry-time <integer>;
         multi-master <boolean>;
-        notify ( explicit | master-only | <boolean> );
+        notify ( explicit | master-only | primary-only | <boolean> );
         notify-delay <integer>;
         notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
             dscp <integer> ];
index 662b7dfbd4ca4da317787c9a9768c23171068e2c..3c5b9d8efbc4a3f0259ab83ac7396bb376582c28 100644 (file)
        new-zones-directory <quoted_string>;
        no-case-compress { <address_match_element>; ... };
        nocookie-udp-size <integer>;
-       notify ( explicit | master-only | <boolean> );
+       notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-rate <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [
index 987bc01d22c3a5698195905c3f44276d050e4acd..7bc7f3594686e5a0d0d419e351c912a91478adc0 100644 (file)
@@ -39,7 +39,7 @@ zone <string> [ <class> ] {
        min-refresh-time <integer>;
        min-retry-time <integer>;
        multi-master <boolean>;
-       notify ( explicit | master-only | <boolean> );
+       notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
        notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
index b81468dbc10eb7377889ed4b3189b110f37abc78..f33c1176ab131b0b27bce2310b67c9688e96f372 100644 (file)
@@ -41,7 +41,7 @@
        min-refresh-time <integer>;
        min-retry-time <integer>;
        multi-master <boolean>;
-       notify ( explicit | master-only | <boolean> );
+       notify ( explicit | master-only | primary-only | <boolean> );
        notify-delay <integer>;
        notify-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
        notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ] [ dscp <integer> ];
index c878d53c8144cbecae5666b5cdc80475a2ed3193..2c940e6668a4e4c92c4460d012b3a81aa8c6f34a 100644 (file)
@@ -2427,9 +2427,11 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
                        if (cfg_obj_isboolean(obj)) {
                                donotify = cfg_obj_asboolean(obj);
                        } else {
-                               const char *notifystr = cfg_obj_asstring(obj);
+                               const char *str = cfg_obj_asstring(obj);
                                if (ztype != CFG_ZONE_MASTER &&
-                                   strcasecmp(notifystr, "master-only") == 0) {
+                                   (strcasecmp(str, "master-only") == 0 ||
+                                    strcasecmp(str, "primary-only") == 0))
+                               {
                                        donotify = false;
                                }
                        }
index 01995a673af1b4e5e62f089845e1dd8b0fbd75e2..28dbde65ff9c3f7ce3fdc581d333f4358fcbed38 100644 (file)
@@ -2823,7 +2823,8 @@ static cfg_type_t cfg_type_dialuptype = { "dialuptype",        parse_dialup_type,
                                          cfg_print_ustring, doc_dialup_type,
                                          &cfg_rep_string,   dialup_enums };
 
-static const char *notify_enums[] = { "explicit", "master-only", NULL };
+static const char *notify_enums[] = { "explicit", "master-only", "primary-only",
+                                     NULL };
 static isc_result_t
 parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
        return (cfg_parse_enum_or_other(pctx, type, &cfg_type_boolean, ret));