diff --git a/bin/named/named.conf.rst b/bin/named/named.conf.rst index dcbc527825..0716c1b748 100644 --- a/bin/named/named.conf.rst +++ b/bin/named/named.conf.rst @@ -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 ]; diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 2f7de9e89e..4bd79ed6cc 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -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); diff --git a/bin/tests/system/checkconf/good.conf b/bin/tests/system/checkconf/good.conf index 69168df84d..f083dae2d0 100644 --- a/bin/tests/system/checkconf/good.conf +++ b/bin/tests/system/checkconf/good.conf @@ -168,6 +168,7 @@ view "third" { masters { 1.2.3.4; }; + notify primary-only; }; }; view "fourth" { diff --git a/doc/misc/master.zoneopt b/doc/misc/master.zoneopt index 70f069f15c..f9903b34e8 100644 --- a/doc/misc/master.zoneopt +++ b/doc/misc/master.zoneopt @@ -41,7 +41,7 @@ zone [ ] { max-transfer-idle-out ; max-transfer-time-out ; max-zone-ttl ( unlimited | ); - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/master.zoneopt.rst b/doc/misc/master.zoneopt.rst index df3a1ce910..7d97ce8ead 100644 --- a/doc/misc/master.zoneopt.rst +++ b/doc/misc/master.zoneopt.rst @@ -43,7 +43,7 @@ max-transfer-idle-out ; max-transfer-time-out ; max-zone-ttl ( unlimited | ); - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/mirror.zoneopt b/doc/misc/mirror.zoneopt index ada8ae7438..c142586fe2 100644 --- a/doc/misc/mirror.zoneopt +++ b/doc/misc/mirror.zoneopt @@ -28,7 +28,7 @@ zone [ ] { min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/mirror.zoneopt.rst b/doc/misc/mirror.zoneopt.rst index 9e229e006b..84792737dc 100644 --- a/doc/misc/mirror.zoneopt.rst +++ b/doc/misc/mirror.zoneopt.rst @@ -30,7 +30,7 @@ min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/options b/doc/misc/options index bf30d1f10c..b6e5cc466f 100644 --- a/doc/misc/options +++ b/doc/misc/options @@ -272,7 +272,7 @@ options { no-case-compress { ; ... }; nocookie-udp-size ; nosit-udp-size ; // obsolete - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-rate ; notify-source ( | * ) [ port ( | * ) ] [ @@ -634,7 +634,7 @@ view [ ] { no-case-compress { ; ... }; nocookie-udp-size ; nosit-udp-size ; // obsolete - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; @@ -846,7 +846,7 @@ view [ ] { min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; @@ -955,7 +955,7 @@ zone [ ] { min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/options.active b/doc/misc/options.active index 0be7cffd74..018548edcc 100644 --- a/doc/misc/options.active +++ b/doc/misc/options.active @@ -240,7 +240,7 @@ options { new-zones-directory ; no-case-compress { ; ... }; nocookie-udp-size ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-rate ; notify-source ( | * ) [ port ( | * ) ] [ @@ -566,7 +566,7 @@ view [ ] { new-zones-directory ; no-case-compress { ; ... }; nocookie-udp-size ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; @@ -763,7 +763,7 @@ view [ ] { min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; @@ -865,7 +865,7 @@ zone [ ] { min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/options.grammar.rst b/doc/misc/options.grammar.rst index f5cb236cfb..034302cc29 100644 --- a/doc/misc/options.grammar.rst +++ b/doc/misc/options.grammar.rst @@ -169,7 +169,7 @@ new-zones-directory ; no-case-compress { ; ... }; nocookie-udp-size ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-rate ; notify-source ( | * ) [ port ( | * ) ] [ diff --git a/doc/misc/slave.zoneopt b/doc/misc/slave.zoneopt index 6a3deee91d..040f2d5b69 100644 --- a/doc/misc/slave.zoneopt +++ b/doc/misc/slave.zoneopt @@ -40,7 +40,7 @@ zone [ ] { min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/slave.zoneopt.rst b/doc/misc/slave.zoneopt.rst index b5a0b02ae9..d9617de9d3 100644 --- a/doc/misc/slave.zoneopt.rst +++ b/doc/misc/slave.zoneopt.rst @@ -42,7 +42,7 @@ min-refresh-time ; min-retry-time ; multi-master ; - notify ( explicit | master-only | ); + notify ( explicit | master-only | primary-only | ); notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/lib/bind9/check.c b/lib/bind9/check.c index eb9e5a105c..f2078fc6c2 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -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; } } diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index c7906fb42c..2e93cb3faa 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -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));