]> 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)
committerEvan Hunt <each@isc.org>
Wed, 1 Jul 2020 18:11:34 +0000 (11:11 -0700)
update the "notify" option to use RFC 8499 terminology as well.

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 dcbc5278251050147088c755f864569ac86e5883..0716c1b748d92dcefa2be939cd5b657c56f91027 100644 (file)
@@ -312,7 +312,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 | * ) ] [
@@ -675,7 +675,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 ];
@@ -872,7 +872,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 ];
@@ -979,7 +979,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 2f7de9e89e3994579bae0501f5e1b3ac51bc6931..4bd79ed6cc9f116c6b0dc6a80a7707460ddc0e11 100644 (file)
@@ -1271,10 +1271,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 69168df84d4992fc506ed32e7bc9d8aa06e712c8..f083dae2d0ef951d1256ffdf2b10d6cae13683a0 100644 (file)
@@ -168,6 +168,7 @@ view "third" {
                masters {
                        1.2.3.4;
                };
+               notify primary-only;
        };
 };
 view "fourth" {
index 70f069f15c4691a3865811ed8781a16169b571c1..f9903b34e818546a4dd020fe571c162036b7b301 100644 (file)
@@ -41,7 +41,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 df3a1ce9109f8a3d78c68c0a229cd950b386df64..7d97ce8ead95f13bf581b2c0702d0b3814d0daba 100644 (file)
@@ -43,7 +43,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 ada8ae7438fd63d8e63fe971a9f019ba211f5182..c142586fe21510935ce26a616b11f59cdc938daf 100644 (file)
@@ -28,7 +28,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 9e229e006bf0d18a9876e561bc5d51508475f195..84792737dcc3117d1cc43cda52f069be2b4b1a9e 100644 (file)
@@ -30,7 +30,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 bf30d1f10c85c8aaddb01298cf6fd5f78703c3a0..b6e5cc466fabcd9b14f3919d811d42c99dd4d023 100644 (file)
@@ -272,7 +272,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> | * ) ] [
@@ -634,7 +634,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> ];
@@ -846,7 +846,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 0be7cffd74de88782c01a55ed18c0fbbb0aeaa43..018548edcc79c603211f16591e3f47c9a459e54e 100644 (file)
@@ -240,7 +240,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> | * ) ] [
@@ -566,7 +566,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> ];
@@ -763,7 +763,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> ];
@@ -865,7 +865,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 f5cb236cfb0ce8009027d5e4311aa207a0714614..034302cc290e880bfb09ebb831635966556db359 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 6a3deee91d9ab72563462b76a1a49fa22e896bd7..040f2d5b69a2dd16900826b79c560d55ee0ced04 100644 (file)
@@ -40,7 +40,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 b5a0b02ae98e822362dd88958598e161227ada18..d9617de9d341b55b8d2eec20be44399d55262566 100644 (file)
@@ -42,7 +42,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 eb9e5a105cb7dfe1d085b857c1c0812239ff64ef..f2078fc6c2012157141cb5c527aa43491dfab459 100644 (file)
@@ -2456,9 +2456,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 c7906fb42c23256ebe2fce73dadaef5b5e80d1a0..2e93cb3faac9301594b8a94f67a378538e88098a 100644 (file)
@@ -2812,7 +2812,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));