From: Evan Hunt Date: Wed, 17 Jun 2020 09:02:27 +0000 (-0700) Subject: add "primaries" as a synonym for "masters" in named.conf X-Git-Tag: v9.16.12~39^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04b9cdb53cfde4fb0852f26f0dde0ec1f0d9f870;p=thirdparty%2Fbind9.git add "primaries" as a synonym for "masters" in named.conf as "type primary" is preferred over "type master" now, it makes sense to make "primaries" available as a synonym too. added a correctness check to ensure "primaries" and "masters" cannot both be used in the same zone. (cherry picked from commit 16e14353b1755111645024d06fa4225e019ba9a2) --- diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index ed302d9ebc5..3e3fcf37b25 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -184,7 +184,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, const char *zname; const char *zfile = NULL; const cfg_obj_t *maps[4]; - const cfg_obj_t *mastersobj = NULL; + const cfg_obj_t *primariesobj = NULL; const cfg_obj_t *inviewobj = NULL; const cfg_obj_t *zoptions = NULL; const cfg_obj_t *classobj = NULL; @@ -278,8 +278,12 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig, * Is the redirect zone configured as a slave? */ if (strcasecmp(cfg_obj_asstring(typeobj), "redirect") == 0) { - cfg_map_get(zoptions, "masters", &mastersobj); - if (mastersobj != NULL) { + cfg_map_get(zoptions, "primaries", &primariesobj); + if (primariesobj == NULL) { + cfg_map_get(zoptions, "masters", &primariesobj); + } + + if (primariesobj != NULL) { return (ISC_R_SUCCESS); } } diff --git a/bin/named/config.c b/bin/named/config.c index 8767e472ee4..678c9ac5f40 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -303,7 +303,7 @@ view \"_bind\" chaos {\n\ "# END MANAGED KEYS\n\ \n\ -masters " DEFAULT_IANA_ROOT_ZONE_MASTERS " {\n\ +primaries " DEFAULT_IANA_ROOT_ZONE_PRIMARIES " {\n\ 2001:500:84::b; # b.root-servers.net\n\ 2001:500:2f::f; # f.root-servers.net\n\ 2001:7fd::1; # k.root-servers.net\n\ @@ -568,17 +568,21 @@ named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp, } isc_result_t -named_config_getmastersdef(const cfg_obj_t *cctx, const char *name, - const cfg_obj_t **ret) { +named_config_getprimariesdef(const cfg_obj_t *cctx, const char *name, + const cfg_obj_t **ret) { isc_result_t result; - const cfg_obj_t *masters = NULL; + const cfg_obj_t *primaries = NULL; const cfg_listelt_t *elt; - result = cfg_map_get(cctx, "masters", &masters); + result = cfg_map_get(cctx, "primaries", &primaries); + if (result != ISC_R_SUCCESS) { + result = cfg_map_get(cctx, "masters", &primaries); + } if (result != ISC_R_SUCCESS) { return (result); } - for (elt = cfg_list_first(masters); elt != NULL; + + for (elt = cfg_list_first(primaries); elt != NULL; elt = cfg_list_next(elt)) { const cfg_obj_t *list; const char *listname; @@ -679,7 +683,7 @@ resume: isc_buffer_t b; addr = cfg_tuple_get(cfg_listelt_value(element), - "masterselement"); + "primarieselement"); key = cfg_tuple_get(cfg_listelt_value(element), "key"); if (!cfg_obj_issockaddr(addr)) { @@ -711,11 +715,11 @@ resume: if (j < l) { continue; } - tresult = named_config_getmastersdef(config, listname, - &list); + tresult = named_config_getprimariesdef(config, listname, + &list); if (tresult == ISC_R_NOTFOUND) { cfg_obj_log(addr, named_g_lctx, ISC_LOG_ERROR, - "masters \"%s\" not found", + "primaries \"%s\" not found", listname); result = tresult; diff --git a/bin/named/include/named/config.h b/bin/named/include/named/config.h index 57b850953e9..06a414164ac 100644 --- a/bin/named/include/named/config.h +++ b/bin/named/include/named/config.h @@ -21,7 +21,7 @@ #include -#define DEFAULT_IANA_ROOT_ZONE_MASTERS "_default_iana_root_zone_masters" +#define DEFAULT_IANA_ROOT_ZONE_PRIMARIES "_default_iana_root_zone_primaries" isc_result_t named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf); @@ -59,8 +59,8 @@ named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp, uint32_t count); isc_result_t -named_config_getmastersdef(const cfg_obj_t *cctx, const char *name, - const cfg_obj_t **ret); +named_config_getprimariesdef(const cfg_obj_t *cctx, const char *name, + const cfg_obj_t **ret); isc_result_t named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, diff --git a/bin/named/named.conf.rst b/bin/named/named.conf.rst index daaa45407b0..4e3429ac267 100644 --- a/bin/named/named.conf.rst +++ b/bin/named/named.conf.rst @@ -145,8 +145,8 @@ MASTERS :: masters string [ port integer ] [ dscp - integer ] { ( masters | ipv4_address [ - port integer ] | ipv6_address [ port + integer ] { ( primaries | ipv4_address + [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... }; OPTIONS @@ -166,7 +166,7 @@ OPTIONS allow-transfer { address_match_element; ... }; allow-update { address_match_element; ... }; allow-update-forwarding { address_match_element; ... }; - also-notify [ port integer ] [ dscp integer ] { ( masters | + also-notify [ port integer ] [ dscp integer ] { ( primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... }; alt-transfer-source ( ipv4_address | * ) [ port ( integer | * ) @@ -184,7 +184,7 @@ OPTIONS blackhole { address_match_element; ... }; cache-file quoted_string; catalog-zones { zone string [ default-masters [ port integer ] - [ dscp integer ] { ( masters | ipv4_address [ port + [ dscp integer ] { ( primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... } ] [ zone-directory quoted_string ] [ in-memory boolean ] [ min-update-interval duration ]; ... }; @@ -459,6 +459,16 @@ PLUGIN plugin ( query ) string [ { unspecified-text } ]; +PRIMARIES +^^^^^^^^^ + +:: + + primaries string [ port integer ] [ dscp + integer ] { ( primaries | ipv4_address + [ port integer ] | ipv6_address [ port + integer ] ) [ key string ]; ... }; + SERVER ^^^^^^ @@ -547,7 +557,7 @@ VIEW allow-transfer { address_match_element; ... }; allow-update { address_match_element; ... }; allow-update-forwarding { address_match_element; ... }; - also-notify [ port integer ] [ dscp integer ] { ( masters | + also-notify [ port integer ] [ dscp integer ] { ( primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... }; alt-transfer-source ( ipv4_address | * ) [ port ( integer | * ) @@ -559,7 +569,7 @@ VIEW auto-dnssec ( allow | maintain | off ); cache-file quoted_string; catalog-zones { zone string [ default-masters [ port integer ] - [ dscp integer ] { ( masters | ipv4_address [ port + [ dscp integer ] { ( primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... } ] [ zone-directory quoted_string ] [ in-memory boolean ] [ min-update-interval duration ]; ... }; @@ -820,7 +830,7 @@ VIEW allow-update { address_match_element; ... }; allow-update-forwarding { address_match_element; ... }; also-notify [ port integer ] [ dscp integer ] { ( - masters | ipv4_address [ port integer ] | + primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... }; alt-transfer-source ( ipv4_address | * ) [ port ( @@ -860,7 +870,7 @@ VIEW key-directory quoted_string; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port integer ] [ dscp integer ] { ( masters + masters [ port integer ] [ dscp integer ] { ( primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... }; max-journal-size ( default | unlimited | sizeval ); @@ -882,6 +892,10 @@ VIEW notify-source-v6 ( ipv6_address | * ) [ port ( integer | * ) ] [ dscp integer ]; notify-to-soa boolean; + primaries [ port integer ] [ dscp integer ] { ( + primaries | ipv4_address [ port integer ] | + ipv6_address [ port integer ] ) [ key string ]; + ... }; request-expire boolean; request-ixfr boolean; serial-update-method ( date | increment | unixtime ); @@ -924,7 +938,7 @@ ZONE allow-transfer { address_match_element; ... }; allow-update { address_match_element; ... }; allow-update-forwarding { address_match_element; ... }; - also-notify [ port integer ] [ dscp integer ] { ( masters | + also-notify [ port integer ] [ dscp integer ] { ( primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... }; alt-transfer-source ( ipv4_address | * ) [ port ( integer | * ) @@ -962,7 +976,7 @@ ZONE key-directory quoted_string; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port integer ] [ dscp integer ] { ( masters | + masters [ port integer ] [ dscp integer ] { ( primaries | ipv4_address [ port integer ] | ipv6_address [ port integer ] ) [ key string ]; ... }; max-journal-size ( default | unlimited | sizeval ); @@ -984,6 +998,9 @@ ZONE notify-source-v6 ( ipv6_address | * ) [ port ( integer | * ) ] [ dscp integer ]; notify-to-soa boolean; + primaries [ port integer ] [ dscp integer ] { ( primaries | + ipv4_address [ port integer ] | ipv6_address [ port + integer ] ) [ key string ]; ... }; request-expire boolean; request-ixfr boolean; serial-update-method ( date | increment | unixtime ); diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 218c385cdd1..4bc8c199edf 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -1218,8 +1218,8 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, /* * Configure master functionality. This applies - * to primary masters (type "master") and slaves - * acting as masters (type "slave"), but not to stubs. + * to primary servers (type "primary") and secondaries + * acting as primaries (type "secondary"), but not to stubs. */ if (ztype != dns_zone_stub && ztype != dns_zone_staticstub && ztype != dns_zone_redirect) @@ -1500,7 +1500,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, /* * Configure update-related options. These apply to - * primary masters only. + * primary servers only. */ if (ztype == dns_zone_master) { dns_acl_t *updateacl; @@ -1855,17 +1855,21 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, case dns_zone_redirect: count = 0; obj = NULL; - (void)cfg_map_get(zoptions, "masters", &obj); + (void)cfg_map_get(zoptions, "primaries", &obj); + if (obj == NULL) { + (void)cfg_map_get(zoptions, "masters", &obj); + } + /* - * Use the built-in master server list if one was not + * Use the built-in primary server list if one was not * explicitly specified and this is a root zone mirror. */ if (obj == NULL && ztype == dns_zone_mirror && dns_name_equal(dns_zone_getorigin(zone), dns_rootname)) { - result = named_config_getmastersdef( - named_g_config, DEFAULT_IANA_ROOT_ZONE_MASTERS, - &obj); + result = named_config_getprimariesdef( + named_g_config, + DEFAULT_IANA_ROOT_ZONE_PRIMARIES, &obj); RETERR(result); } if (obj != NULL) { @@ -1874,13 +1878,13 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig, RETERR(named_config_getipandkeylist(config, obj, mctx, &ipkl)); - result = dns_zone_setmasterswithkeys( + result = dns_zone_setprimarieswithkeys( mayberaw, ipkl.addrs, ipkl.keys, ipkl.count); count = ipkl.count; dns_ipkeylist_clear(mctx, &ipkl); RETERR(result); } else { - result = dns_zone_setmasters(mayberaw, NULL, 0); + result = dns_zone_setprimaries(mayberaw, NULL, 0); } RETERR(result); diff --git a/bin/tests/optional/zone_test.c b/bin/tests/optional/zone_test.c index 3310e195c02..6dceb024521 100644 --- a/bin/tests/optional/zone_test.c +++ b/bin/tests/optional/zone_test.c @@ -114,7 +114,7 @@ setup(const char *zonename, const char *filename, const char *classname) { dns_zone_setclass(zone, rdclass); if (zonetype == dns_zone_slave) { - dns_zone_setmasters(zone, &addr, 1); + dns_zone_setprimaries(zone, &addr, 1); } result = dns_zone_load(zone, false); diff --git a/bin/tests/system/addzone/ns3/named1.conf.in b/bin/tests/system/addzone/ns3/named1.conf.in index d802506f218..f6f382b5495 100644 --- a/bin/tests/system/addzone/ns3/named1.conf.in +++ b/bin/tests/system/addzone/ns3/named1.conf.in @@ -30,6 +30,6 @@ zone "." { file "redirect.db"; }; -masters "testmaster" { +primaries "testmaster" { 192.5.5.241; }; diff --git a/bin/tests/system/addzone/tests.sh b/bin/tests/system/addzone/tests.sh index a80b6199cba..c1c19cf126b 100755 --- a/bin/tests/system/addzone/tests.sh +++ b/bin/tests/system/addzone/tests.sh @@ -687,7 +687,7 @@ status=`expr $status + $ret` echo_i "check delzone after reconfig failure ($n)" ret=0 -$RNDCCMD 10.53.0.3 addzone 'inlineslave.example. IN { type slave; file "inlineslave.db"; masterfile-format text; masters { testmaster; }; };' > /dev/null 2>&1 || ret=1 +$RNDCCMD 10.53.0.3 addzone 'inlineslave.example. IN { type slave; file "inlineslave.db"; masterfile-format text; primaries { testmaster; }; };' > /dev/null 2>&1 || ret=1 copy_setports ns3/named2.conf.in ns3/named.conf rndc_reconfig ns3 10.53.0.3 $RNDCCMD 10.53.0.3 delzone inlineslave.example > /dev/null 2>&1 || ret=1 diff --git a/bin/tests/system/auth/ns2/named.conf.in b/bin/tests/system/auth/ns2/named.conf.in index 33d5fd120b6..89b4d4c5038 100644 --- a/bin/tests/system/auth/ns2/named.conf.in +++ b/bin/tests/system/auth/ns2/named.conf.in @@ -23,12 +23,12 @@ options { zone example.net { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "example.net.bk"; }; zone example.com { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "example.com.bk"; }; diff --git a/bin/tests/system/autosign/ns3/named.conf.in b/bin/tests/system/autosign/ns3/named.conf.in index 35cb0587a6d..141a3b8e7a3 100644 --- a/bin/tests/system/autosign/ns3/named.conf.in +++ b/bin/tests/system/autosign/ns3/named.conf.in @@ -45,13 +45,13 @@ zone "." { zone "example" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "example.bk"; }; zone "bar" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "bar.bk"; }; diff --git a/bin/tests/system/cacheclean/ns2/named.conf.in b/bin/tests/system/cacheclean/ns2/named.conf.in index 3c0fcac154f..eecb5e8759e 100644 --- a/bin/tests/system/cacheclean/ns2/named.conf.in +++ b/bin/tests/system/cacheclean/ns2/named.conf.in @@ -44,5 +44,5 @@ zone "flushtest.example" { zone "expire-test" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; diff --git a/bin/tests/system/case/ns2/named.conf.in b/bin/tests/system/case/ns2/named.conf.in index 473444ac29d..145f106e448 100644 --- a/bin/tests/system/case/ns2/named.conf.in +++ b/bin/tests/system/case/ns2/named.conf.in @@ -28,11 +28,11 @@ options { zone "example" { type slave; file "example.bk"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; zone "dynamic" { type slave; file "dynamic.bk"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; diff --git a/bin/tests/system/catz/ns2/named.conf.in b/bin/tests/system/catz/ns2/named.conf.in index ee83efbee46..55a6ae62a43 100644 --- a/bin/tests/system/catz/ns2/named.conf.in +++ b/bin/tests/system/catz/ns2/named.conf.in @@ -47,25 +47,25 @@ options { zone "catalog1.example" { type slave; file "catalog1.example.db"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; zone "catalog2.example" { type slave; file "catalog2.example.db"; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; }; zone "catalog3.example" { type slave; file "catalog3.example.db"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; zone "catalog4.example" { type slave; file "catalog4.example.db"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; key tsig_key. { diff --git a/bin/tests/system/checkconf/bad-masters-dup.conf b/bin/tests/system/checkconf/bad-masters-dup.conf new file mode 100644 index 00000000000..18dc4590da0 --- /dev/null +++ b/bin/tests/system/checkconf/bad-masters-dup.conf @@ -0,0 +1,16 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +zone "example.net" { + type secondary; + primaries { 192.168.1.1; }; + masters { 192.168.1.2; }; +}; diff --git a/bin/tests/system/dnssec/ns3/named.conf.in b/bin/tests/system/dnssec/ns3/named.conf.in index 53bfb434581..c632e7e9cf9 100644 --- a/bin/tests/system/dnssec/ns3/named.conf.in +++ b/bin/tests/system/dnssec/ns3/named.conf.in @@ -42,7 +42,7 @@ zone "." { zone "example" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "example.bk"; }; @@ -174,7 +174,7 @@ zone "multiple.example" { zone "rfc2335.example" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "rfc2335.example.bk"; }; @@ -247,7 +247,7 @@ zone "split-smart.example" { zone "nsec3chain-test" { type slave; file "nsec3chain-test.bk"; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; }; zone "expiring.example" { diff --git a/bin/tests/system/dnssec/ns4/named4.conf.in b/bin/tests/system/dnssec/ns4/named4.conf.in index d73c36f8c09..22217f36c41 100644 --- a/bin/tests/system/dnssec/ns4/named4.conf.in +++ b/bin/tests/system/dnssec/ns4/named4.conf.in @@ -65,11 +65,11 @@ view auth { zone secure.example { type slave; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; }; zone insecure.secure.example { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; }; }; diff --git a/bin/tests/system/dnssec/ns7/named.conf.in b/bin/tests/system/dnssec/ns7/named.conf.in index 31e3f85cdce..dd4cfd9a3cf 100644 --- a/bin/tests/system/dnssec/ns7/named.conf.in +++ b/bin/tests/system/dnssec/ns7/named.conf.in @@ -32,31 +32,31 @@ zone "." { zone "nsec3.example" { type slave; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; file "nsec3.example.bk"; }; zone "optout.example" { type slave; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; file "optout.example.bk"; }; zone "nsec3-unknown.example" { type slave; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; file "nsec3-unknown.example.bk"; }; zone "optout-unknown.example" { type slave; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; file "optout-unknown.example.bk"; }; zone "multiple.example" { type slave; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; file "multiple.example.bk"; }; diff --git a/bin/tests/system/dscp/ns2/named.conf.in b/bin/tests/system/dscp/ns2/named.conf.in index 4edc7e7ddba..0b4fa4b4ab7 100644 --- a/bin/tests/system/dscp/ns2/named.conf.in +++ b/bin/tests/system/dscp/ns2/named.conf.in @@ -26,5 +26,5 @@ options { zone "." { type slave; file "root.bk"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; diff --git a/bin/tests/system/dscp/ns5/named.conf.in b/bin/tests/system/dscp/ns5/named.conf.in index dc2bb6089ed..88a7ac1b5aa 100644 --- a/bin/tests/system/dscp/ns5/named.conf.in +++ b/bin/tests/system/dscp/ns5/named.conf.in @@ -27,5 +27,5 @@ options { zone "." { type slave; file "root.bk"; - masters { 10.53.0.4; }; + primaries { 10.53.0.4; }; }; diff --git a/bin/tests/system/dscp/ns7/named.conf.in b/bin/tests/system/dscp/ns7/named.conf.in index 25ed20ac634..36932a458c1 100644 --- a/bin/tests/system/dscp/ns7/named.conf.in +++ b/bin/tests/system/dscp/ns7/named.conf.in @@ -30,5 +30,5 @@ zone "." { transfer-source 10.53.0.7 dscp 46; notify-source 10.53.0.7 dscp 46; alt-transfer-source 10.53.0.7 dscp 46; - masters { 10.53.0.4; }; + primaries { 10.53.0.4; }; }; diff --git a/bin/tests/system/inline/ns3/named.conf.in b/bin/tests/system/inline/ns3/named.conf.in index a8c434dc025..c5f467f4445 100644 --- a/bin/tests/system/inline/ns3/named.conf.in +++ b/bin/tests/system/inline/ns3/named.conf.in @@ -34,7 +34,7 @@ options { zone "bits" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; inline-signing yes; auto-dnssec maintain; allow-update-forwarding { any; }; @@ -46,7 +46,7 @@ server 10.53.0.4 { request-ixfr no; }; zone "noixfr" { type slave; - masters { 10.53.0.4; }; + primaries { 10.53.0.4; }; inline-signing yes; auto-dnssec maintain; allow-update-forwarding { any; }; @@ -90,7 +90,7 @@ zone "expired" { zone "retransfer" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; inline-signing yes; auto-dnssec maintain; file "retransfer.bk"; @@ -114,7 +114,7 @@ zone "externalkey" { zone "retransfer3" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; inline-signing yes; auto-dnssec maintain; file "retransfer3.bk"; @@ -122,7 +122,7 @@ zone "retransfer3" { zone "inactiveksk" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; inline-signing yes; auto-dnssec maintain; dnssec-dnskey-kskonly yes; @@ -131,7 +131,7 @@ zone "inactiveksk" { zone "inactivezsk" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; inline-signing yes; auto-dnssec maintain; file "inactivezsk.bk"; @@ -139,7 +139,7 @@ zone "inactivezsk" { zone "nokeys" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; inline-signing yes; auto-dnssec maintain; file "nokeys.bk"; @@ -163,7 +163,7 @@ zone "removedkeys-primary" { zone "removedkeys-secondary" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; inline-signing yes; auto-dnssec maintain; file "removedkeys-secondary.bk"; diff --git a/bin/tests/system/ixfr/ns4/named.conf.in b/bin/tests/system/ixfr/ns4/named.conf.in index d3490b18e41..92a2b91e82f 100644 --- a/bin/tests/system/ixfr/ns4/named.conf.in +++ b/bin/tests/system/ixfr/ns4/named.conf.in @@ -36,12 +36,12 @@ view "primary" { zone "test" IN { type slave; file "mytest.db"; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; }; zone "sub.test" IN { type slave; file "subtest.db"; request-ixfr no; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; }; }; diff --git a/bin/tests/system/ixfr/ns5/named.conf.in b/bin/tests/system/ixfr/ns5/named.conf.in index 220b1d39a27..71129f6a0bc 100644 --- a/bin/tests/system/ixfr/ns5/named.conf.in +++ b/bin/tests/system/ixfr/ns5/named.conf.in @@ -37,12 +37,12 @@ view "primary" { zone "test" IN { type slave; file "mytest.db"; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; }; zone "sub.test" IN { type slave; file "subtest.db"; request-ixfr no; - masters { 10.53.0.3; }; + primaries { 10.53.0.3; }; }; }; diff --git a/bin/tests/system/kasp/ns3/named.conf.in b/bin/tests/system/kasp/ns3/named.conf.in index b187983dcb6..83fdc18f364 100644 --- a/bin/tests/system/kasp/ns3/named.conf.in +++ b/bin/tests/system/kasp/ns3/named.conf.in @@ -110,7 +110,7 @@ zone "dnssec-keygen.kasp" { /* A secondary zone with dnssec-policy. */ zone "secondary.kasp" { type secondary; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "secondary.kasp.db"; dnssec-policy "rsasha1"; }; diff --git a/bin/tests/system/masterformat/ns2/named.conf.in b/bin/tests/system/masterformat/ns2/named.conf.in index fb519466f40..d4ce9713217 100644 --- a/bin/tests/system/masterformat/ns2/named.conf.in +++ b/bin/tests/system/masterformat/ns2/named.conf.in @@ -28,26 +28,26 @@ zone "example" { zone "transfer1" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "transfer.db.raw"; }; zone "transfer2" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; masterfile-format text; file "transfer.db.txt"; }; zone "transfer3" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "formerly-text.db"; }; zone "transfer4" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; masterfile-format text; masterfile-style full; file "transfer.db.full"; @@ -55,7 +55,7 @@ zone "transfer4" { zone "large" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; masterfile-format raw; file "large.bk"; }; diff --git a/bin/tests/system/mirror/ns3/named.conf.in b/bin/tests/system/mirror/ns3/named.conf.in index e851b8cbf1a..4ee23c5554a 100644 --- a/bin/tests/system/mirror/ns3/named.conf.in +++ b/bin/tests/system/mirror/ns3/named.conf.in @@ -39,59 +39,59 @@ zone "." { zone "." { type mirror; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "root.db.mirror"; }; zone "initially-unavailable" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "initially-unavailable.db.mirror"; use-alt-transfer-source no; }; zone "verify-axfr" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "verify-axfr.db.mirror"; }; zone "verify-csk" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "verify-csk.db.mirror"; }; zone "verify-ixfr" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "verify-ixfr.db.mirror"; masterfile-format text; }; zone "verify-load" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "verify-load.db.mirror"; masterfile-format text; }; zone "verify-reconfig" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "verify-reconfig.db.mirror"; masterfile-format text; }; zone "verify-unsigned" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "verify-unsigned.db.mirror"; }; zone "verify-untrusted" { type mirror; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "verify-untrusted.db.mirror"; }; diff --git a/bin/tests/system/notify/ns2/named.conf.in b/bin/tests/system/notify/ns2/named.conf.in index 2e5bd287409..464503d2871 100644 --- a/bin/tests/system/notify/ns2/named.conf.in +++ b/bin/tests/system/notify/ns2/named.conf.in @@ -43,9 +43,9 @@ zone "example" { also-notify { /* empty */ }; }; -masters noport { 10.53.0.4; }; +primaries noport { 10.53.0.4; }; -masters x21 port @EXTRAPORT1@ { noport; }; +primaries x21 port @EXTRAPORT1@ { noport; }; zone x1 { type master; file "generic.db"; also-notify { 10.53.0.3; }; }; zone x2 { type master; file "generic.db"; also-notify { 10.53.0.3; }; }; diff --git a/bin/tests/system/notify/ns3/named.conf.in b/bin/tests/system/notify/ns3/named.conf.in index 0c3250748ba..f0e47c116a5 100644 --- a/bin/tests/system/notify/ns3/named.conf.in +++ b/bin/tests/system/notify/ns3/named.conf.in @@ -28,6 +28,6 @@ zone "." { zone "example" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "example.bk"; }; diff --git a/bin/tests/system/notify/ns4/named.conf.in b/bin/tests/system/notify/ns4/named.conf.in index 57e2a53d90b..72a737f97b0 100644 --- a/bin/tests/system/notify/ns4/named.conf.in +++ b/bin/tests/system/notify/ns4/named.conf.in @@ -28,6 +28,6 @@ zone "." { zone "x21" { type slave; - masters { 10.53.0.2 port @PORT@; }; + primaries { 10.53.0.2 port @PORT@; }; file "x21.bk"; }; diff --git a/bin/tests/system/notify/ns5/named.conf.in b/bin/tests/system/notify/ns5/named.conf.in index 2976bfc1664..7fe80f50e2e 100644 --- a/bin/tests/system/notify/ns5/named.conf.in +++ b/bin/tests/system/notify/ns5/named.conf.in @@ -50,7 +50,7 @@ view "b" { match-clients { key "b"; }; zone "x21" { type slave; - masters { 10.53.0.5 key "a"; }; + primaries { 10.53.0.5 key "a"; }; file "x21.bk-b"; notify no; }; @@ -60,7 +60,7 @@ view "c" { match-clients { key "c"; }; zone "x21" { type slave; - masters { 10.53.0.5 key "a"; }; + primaries { 10.53.0.5 key "a"; }; file "x21.bk-c"; notify no; }; diff --git a/bin/tests/system/nsupdate/ns1/named.conf.in b/bin/tests/system/nsupdate/ns1/named.conf.in index 346b6472fa6..65100bebf7d 100644 --- a/bin/tests/system/nsupdate/ns1/named.conf.in +++ b/bin/tests/system/nsupdate/ns1/named.conf.in @@ -81,7 +81,7 @@ zone "other.nil" { allow-transfer { any; }; }; -masters othermasters { +primaries others { 10.53.0.2 port @PORT@; 10.53.0.2 port @PORT@ key altkey; }; @@ -93,7 +93,7 @@ zone "update.nil" { check-mx fail; allow-update { any; }; allow-transfer { any; }; - also-notify { othermasters; }; + also-notify { others; }; }; zone "unixtime.nil" { diff --git a/bin/tests/system/nsupdate/ns2/named.conf.in b/bin/tests/system/nsupdate/ns2/named.conf.in index b7038430bd9..16a4a8583de 100644 --- a/bin/tests/system/nsupdate/ns2/named.conf.in +++ b/bin/tests/system/nsupdate/ns2/named.conf.in @@ -41,7 +41,7 @@ view alternate { zone "update.nil" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "update.alt.bk"; allow-transfer { any; }; }; @@ -52,14 +52,14 @@ view primary { zone "example.nil" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "example.bk"; allow-transfer { any; }; }; zone "update.nil" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "update.bk"; allow-transfer { any; }; }; diff --git a/bin/tests/system/nsupdate/ns3/named.conf.in b/bin/tests/system/nsupdate/ns3/named.conf.in index 504d6ebaa3a..c9ca9c2e9c2 100644 --- a/bin/tests/system/nsupdate/ns3/named.conf.in +++ b/bin/tests/system/nsupdate/ns3/named.conf.in @@ -44,7 +44,7 @@ zone "dnskey.test" { zone "many.test" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; allow-update-forwarding { any; }; file "many.test.bk"; }; diff --git a/bin/tests/system/rpz/dnsrpzd.conf.in b/bin/tests/system/rpz/dnsrpzd.conf.in index 7b0afbfc216..bc45808ebb7 100644 --- a/bin/tests/system/rpz/dnsrpzd.conf.in +++ b/bin/tests/system/rpz/dnsrpzd.conf.in @@ -41,20 +41,20 @@ zone "bl17" {type master; file "../ns5/bl.db"; }; zone "bl18" {type master; file "../ns5/bl.db"; }; zone "bl19" {type master; file "../ns5/bl.db"; }; -zone "bl" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-2" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-given" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-passthru" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-no-op" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-disabled" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-nodata" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-nxdomain" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-cname" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-wildcname" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-garden" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-drop" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl-tcp-only" {type slave; masters port @PORT@ { 10.53.0.3; }; }; -zone "bl.tld2" {type slave; masters port @PORT@ { 10.53.0.3; }; }; +zone "bl" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-2" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-given" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-passthru" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-no-op" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-disabled" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-nodata" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-nxdomain" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-cname" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-wildcname" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-garden" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-drop" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl-tcp-only" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; +zone "bl.tld2" {type slave; primaries port @PORT@ { 10.53.0.3; }; }; -zone "policy1" {type slave; masters port @PORT@ { 10.53.0.6; }; }; -zone "policy2" {type slave; masters port @PORT@ { 10.53.0.7; }; }; +zone "policy1" {type slave; primaries port @PORT@ { 10.53.0.6; }; }; +zone "policy2" {type slave; primaries port @PORT@ { 10.53.0.7; }; }; diff --git a/bin/tests/system/rpz/ns3/named.conf.in b/bin/tests/system/rpz/ns3/named.conf.in index 89681acab2d..a39eb37e345 100644 --- a/bin/tests/system/rpz/ns3/named.conf.in +++ b/bin/tests/system/rpz/ns3/named.conf.in @@ -103,7 +103,7 @@ zone "bl-drop." {type master; file "bl-drop.db"; zone "bl-tcp-only." {type master; file "bl-tcp-only.db"; allow-update {any;};}; -zone "bl.tld2." {type slave; file "bl.tld2.db"; masters {10.53.0.2;}; +zone "bl.tld2." {type slave; file "bl.tld2.db"; primaries {10.53.0.2;}; request-ixfr no; masterfile-format text;}; zone "crash1.tld2" {type master; file "crash1"; notify no;}; @@ -124,6 +124,6 @@ zone "mixed-case-rpz." { zone "fast-expire." { type secondary; file "fast-expire.db"; - masters { 10.53.0.5; }; + primaries { 10.53.0.5; }; notify no; }; diff --git a/bin/tests/system/rpz/ns6/named.conf.in b/bin/tests/system/rpz/ns6/named.conf.in index c34546dc47b..d5bf866a313 100644 --- a/bin/tests/system/rpz/ns6/named.conf.in +++ b/bin/tests/system/rpz/ns6/named.conf.in @@ -51,7 +51,7 @@ include "../trusted.conf"; zone "policy1" { type slave; - masters { 10.53.0.5; }; + primaries { 10.53.0.5; }; file "empty.db"; also-notify { 10.53.0.3 port @EXTRAPORT1@; }; notify-delay 0; diff --git a/bin/tests/system/rpz/ns7/named.conf.in b/bin/tests/system/rpz/ns7/named.conf.in index f92b01c06ca..2d135058a30 100644 --- a/bin/tests/system/rpz/ns7/named.conf.in +++ b/bin/tests/system/rpz/ns7/named.conf.in @@ -48,7 +48,7 @@ include "../trusted.conf"; zone "policy2" { type slave; - masters { 10.53.0.5; }; + primaries { 10.53.0.5; }; file "policy2.db"; also-notify { 10.53.0.3 port @EXTRAPORT1@; }; notify-delay 0; diff --git a/bin/tests/system/rrsetorder/ns2/named.conf.in b/bin/tests/system/rrsetorder/ns2/named.conf.in index 998e07459ad..32c49153066 100644 --- a/bin/tests/system/rrsetorder/ns2/named.conf.in +++ b/bin/tests/system/rrsetorder/ns2/named.conf.in @@ -32,6 +32,6 @@ options { zone "." { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "root.bk"; }; diff --git a/bin/tests/system/serve-stale/ns3/named.conf.in b/bin/tests/system/serve-stale/ns3/named.conf.in index 4d3cab3977c..aaa39955d5a 100644 --- a/bin/tests/system/serve-stale/ns3/named.conf.in +++ b/bin/tests/system/serve-stale/ns3/named.conf.in @@ -32,6 +32,6 @@ options { zone "." { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "root.bk"; }; diff --git a/bin/tests/system/serve-stale/ns4/named.conf.in b/bin/tests/system/serve-stale/ns4/named.conf.in index 89accb25921..6a82e567c41 100644 --- a/bin/tests/system/serve-stale/ns4/named.conf.in +++ b/bin/tests/system/serve-stale/ns4/named.conf.in @@ -33,6 +33,6 @@ options { zone "." { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "root.bk"; }; diff --git a/bin/tests/system/statistics/ns3/named.conf.in b/bin/tests/system/statistics/ns3/named.conf.in index 73bd5b57f8e..504ad540e63 100644 --- a/bin/tests/system/statistics/ns3/named.conf.in +++ b/bin/tests/system/statistics/ns3/named.conf.in @@ -53,5 +53,5 @@ zone "example" { zone "a-slave" { type slave; file "slave.bk"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; diff --git a/bin/tests/system/statschannel/ns3/named.conf.in b/bin/tests/system/statschannel/ns3/named.conf.in index e78cff9a7ad..cabe068791e 100644 --- a/bin/tests/system/statschannel/ns3/named.conf.in +++ b/bin/tests/system/statschannel/ns3/named.conf.in @@ -37,5 +37,5 @@ controls { zone "example" { type secondary; file "example.db"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; diff --git a/bin/tests/system/stub/ns3/named.conf.in b/bin/tests/system/stub/ns3/named.conf.in index 4916fab3364..b21509ae046 100644 --- a/bin/tests/system/stub/ns3/named.conf.in +++ b/bin/tests/system/stub/ns3/named.conf.in @@ -35,5 +35,5 @@ zone "example" { zone "child.example" { type stub; file "child.example.st"; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; }; diff --git a/bin/tests/system/unknown/ns2/named.conf.in b/bin/tests/system/unknown/ns2/named.conf.in index 2571626bd7d..0be791ea4fe 100644 --- a/bin/tests/system/unknown/ns2/named.conf.in +++ b/bin/tests/system/unknown/ns2/named.conf.in @@ -24,7 +24,7 @@ options { view "in" { zone "example." { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "example-in.bk"; }; }; diff --git a/bin/tests/system/unknown/ns3/named.conf.in b/bin/tests/system/unknown/ns3/named.conf.in index 2ccb07421ed..056e3ac4b30 100644 --- a/bin/tests/system/unknown/ns3/named.conf.in +++ b/bin/tests/system/unknown/ns3/named.conf.in @@ -24,7 +24,7 @@ options { view "in" { zone "example." { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; inline-signing yes; auto-dnssec maintain; file "example-in.bk"; diff --git a/bin/tests/system/upforwd/ns2/named.conf.in b/bin/tests/system/upforwd/ns2/named.conf.in index bce4809b595..2a609e4c206 100644 --- a/bin/tests/system/upforwd/ns2/named.conf.in +++ b/bin/tests/system/upforwd/ns2/named.conf.in @@ -24,11 +24,11 @@ options { zone "example" { type slave; file "example.bk"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; zone "example2" { type slave; file "example2.bk"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; diff --git a/bin/tests/system/upforwd/ns3/named.conf.in b/bin/tests/system/upforwd/ns3/named.conf.in index dcd22b51366..75a11001e6e 100644 --- a/bin/tests/system/upforwd/ns3/named.conf.in +++ b/bin/tests/system/upforwd/ns3/named.conf.in @@ -35,14 +35,14 @@ zone "example" { type slave; file "example.bk"; allow-update-forwarding { any; }; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; zone "example2" { type slave; file "example2.bk"; allow-update-forwarding { any; }; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; }; zone "nomaster" { @@ -50,5 +50,5 @@ zone "nomaster" { file "nomaster1.db"; allow-update-forwarding { any; }; masterfile-format text; - masters { 10.53.0.4; }; + primaries { 10.53.0.4; }; }; diff --git a/bin/tests/system/views/ns3/named2.conf.in b/bin/tests/system/views/ns3/named2.conf.in index f72255c29a9..63d861082db 100644 --- a/bin/tests/system/views/ns3/named2.conf.in +++ b/bin/tests/system/views/ns3/named2.conf.in @@ -38,7 +38,7 @@ zone "." { zone "example" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "internal.bk"; }; diff --git a/bin/tests/system/xfer/ns2/named.conf.in b/bin/tests/system/xfer/ns2/named.conf.in index 547a9b0d4c0..d4021fad3c9 100644 --- a/bin/tests/system/xfer/ns2/named.conf.in +++ b/bin/tests/system/xfer/ns2/named.conf.in @@ -60,7 +60,7 @@ zone "tsigzone" { zone "slave" { type slave; file "slave.db"; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; masterfile-format text; }; @@ -68,5 +68,5 @@ zone "mapped" { type slave; file "mapped.db"; masterfile-format text; - masters { 10.53.0.100; }; + primaries { 10.53.0.100; }; }; diff --git a/bin/tests/system/xfer/ns3/named.conf.in b/bin/tests/system/xfer/ns3/named.conf.in index 7e8955dce34..49110b73c57 100644 --- a/bin/tests/system/xfer/ns3/named.conf.in +++ b/bin/tests/system/xfer/ns3/named.conf.in @@ -42,13 +42,13 @@ zone "." { zone "example" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "example.bk"; }; zone "master" { type slave; - masters { 10.53.0.6; }; + primaries { 10.53.0.6; }; file "master.bk"; }; @@ -58,20 +58,20 @@ server 10.53.0.2 { zone "tsigzone" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "tsigzone.bk"; allow-transfer { key tsigzone.; }; }; zone "mapped" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; masterfile-format map; file "mapped.bk"; }; zone "xfer-stats" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "xfer-stats.bk"; }; diff --git a/bin/tests/system/xfer/ns6/named.conf.in b/bin/tests/system/xfer/ns6/named.conf.in index 5983f982c24..761e96ee64a 100644 --- a/bin/tests/system/xfer/ns6/named.conf.in +++ b/bin/tests/system/xfer/ns6/named.conf.in @@ -42,26 +42,26 @@ zone "master" { zone "slave" { type slave; notify no; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "slave.bk"; }; zone "edns-expire" { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "edns-expire.bk"; }; zone "axfr-too-big" { type slave; max-records 30; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "axfr-too-big.bk"; }; zone "ixfr-too-big" { type slave; max-records 30; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "ixfr-too-big.bk"; }; diff --git a/bin/tests/system/xfer/ns7/named.conf.in b/bin/tests/system/xfer/ns7/named.conf.in index 04f1e4efe54..9b2652cfdbc 100644 --- a/bin/tests/system/xfer/ns7/named.conf.in +++ b/bin/tests/system/xfer/ns7/named.conf.in @@ -25,7 +25,7 @@ options { listen-on-v6 { none; }; recursion no; notify yes; - ixfr-from-differences slave; + ixfr-from-differences secondary; check-integrity no; }; @@ -35,18 +35,18 @@ zone "." { }; zone "master2" { - type master; + type primary; file "master2.db"; }; zone "slave" { - type slave; - masters { 10.53.0.1; }; + type secondary; + primaries { 10.53.0.1; }; file "slave.bk"; }; zone "edns-expire" { - type slave; - masters { 10.53.0.6; }; + type secondary; + primaries { 10.53.0.6; }; file "edns-expire.bk"; }; diff --git a/bin/tests/system/xfer/tests.sh b/bin/tests/system/xfer/tests.sh index bd040e6064f..71be755a003 100755 --- a/bin/tests/system/xfer/tests.sh +++ b/bin/tests/system/xfer/tests.sh @@ -186,7 +186,7 @@ if test $tmp != 0 ; then echo_i "failed"; fi status=$((status+tmp)) n=$((n+1)) -echo_i "testing ixfr-from-differences master; (slave zone) ($n)" +echo_i "testing ixfr-from-differences master; (secondary zone) ($n)" tmp=0 $DIG $DIGOPTS slave. \ @@ -207,7 +207,7 @@ if test $tmp != 0 ; then echo_i "failed"; fi status=$((status+tmp)) n=$((n+1)) -echo_i "testing ixfr-from-differences slave; (master zone) ($n)" +echo_i "testing ixfr-from-differences secondary; (secondary zone) ($n)" tmp=0 # ns7 has a journal iff it generates an IXFR. @@ -218,7 +218,7 @@ if test $tmp != 0 ; then echo_i "failed"; fi status=$((status+tmp)) n=$((n+1)) -echo_i "testing ixfr-from-differences slave; (slave zone) ($n)" +echo_i "testing ixfr-from-differences secondary; (secondary zone) ($n)" tmp=0 $DIG $DIGOPTS slave. \ @@ -259,11 +259,11 @@ $SENDCMD < ans5/goodaxfr # Initially, ns4 is not authoritative for anything. # Now that ans is up and running with the right data, we make ns4 -# a slave for nil. +# a secondary for nil. cat <>ns4/named.conf zone "nil" { - type slave; + type secondary; file "nil.db"; masters { 10.53.0.5 key tsig_key; }; }; diff --git a/bin/tests/system/xferquota/ns2/named.conf.in b/bin/tests/system/xferquota/ns2/named.conf.in index 8b68164edd9..5c1efdc710e 100644 --- a/bin/tests/system/xferquota/ns2/named.conf.in +++ b/bin/tests/system/xferquota/ns2/named.conf.in @@ -31,7 +31,7 @@ zone "." { zone "changing." { type slave; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "changing.bk"; }; diff --git a/bin/tests/system/zero/ns4/named.conf.in b/bin/tests/system/zero/ns4/named.conf.in index 2fc72b67250..0b81bca415f 100644 --- a/bin/tests/system/zero/ns4/named.conf.in +++ b/bin/tests/system/zero/ns4/named.conf.in @@ -23,7 +23,7 @@ options { zone "example" { type slave; - masters { 10.53.0.2; }; + primaries { 10.53.0.2; }; file "example.bk"; }; diff --git a/bin/tests/system/zonechecks/ns2/named.conf.in b/bin/tests/system/zonechecks/ns2/named.conf.in index cd0f7ec24ba..ef878a6002a 100644 --- a/bin/tests/system/zonechecks/ns2/named.conf.in +++ b/bin/tests/system/zonechecks/ns2/named.conf.in @@ -35,6 +35,6 @@ controls { zone "master.example" { type secondary; - masters { 10.53.0.1; }; + primaries { 10.53.0.1; }; file "slave.db"; }; diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index c9d7b96b502..10d2231676e 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -39,8 +39,8 @@ file documentation: ``address_match_list`` A list of one or more ``ip_addr``, ``ip_prefix``, ``key_id``, or ``acl_name`` elements, see :ref:`address_match_lists`. - ``masters_list`` - A named list of one or more ``ip_addr`` with optional ``key_id`` and/or ``ip_port``. A ``masters_list`` may include other ``masters_lists``. + ``primaries_list`` + A named list of one or more ``ip_addr`` with optional ``key_id`` and/or ``ip_port``. A ``primaries_list`` may include other ``primaries_lists``. ``domain_name`` A quoted string which is used as a DNS name, for example "``my.test.domain``". @@ -282,11 +282,14 @@ The following statements are supported: Specifies what the server logs, and where the log messages are sent. ``masters`` - Defines a named masters list for inclusion in stub and secondary zones' ``masters`` or ``also-notify`` lists. + Synonym for ``primaries``. ``options`` Controls global server configuration options and sets defaults for other statements. + ``primaries`` + Defines a named list of servers for inclusion in stub and secondary zones' ``primaries`` or ``also-notify`` lists. (Note: this is a synonym for the original keyword ``masters``, which can still be used, but is no longer the preferred terminology.) + ``server`` Sets certain configuration options on a per-server basis. @@ -847,21 +850,23 @@ At ``debug`` level 4 or higher, the detailed context information logged at ``debug`` level 2 is logged for errors other than SERVFAIL and for negative responses such as NXDOMAIN. -.. _masters_grammar: +.. _primaries_grammar: -``masters`` Statement Grammar +``primaries`` Statement Grammar ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. include:: ../misc/masters.grammar.rst +.. include:: ../misc/primaries.grammar.rst -.. _masters_statement: +.. _primaries_statement: -``masters`` Statement Definition and Usage +``primaries`` Statement Definition and Usage ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``masters`` lists allow for a common set of masters to be easily used by -multiple stub and secondary zones in their ``masters`` or ``also-notify`` -lists. +``primaries`` lists allow for a common set of primary servers to be easily +used by multiple stub and secondary zones in their ``primaries`` or +``also-notify`` lists. (Note: ``primaries`` is a synonym for the original +keyword ``masters``, which can still be used, but is no longer the +preferred terminology.) .. _options_grammar: @@ -1733,15 +1738,16 @@ Boolean Options sections. The default is ``no``. ``notify`` - If ``yes`` (the default), DNS NOTIFY messages are sent when a zone - the server is authoritative for changes; see :ref:`notify`. + If set to ``yes`` (the default), DNS NOTIFY messages are sent when a + zone the server is authoritative for changes; see :ref:`notify`. The messages are sent to the servers listed in the zone's NS records (except the primary server identified in the SOA MNAME field), and to any servers listed in the ``also-notify`` option. - If ``master-only``, notifies are only sent for primary zones. If - ``explicit``, notifies are sent only to servers explicitly listed - using ``also-notify``. If ``no``, no notifies are sent. + If set to ``primary-only`` (or the older keyword ``master-only``), + notifies are only sent for primary zones. If set to ``explicit``, + notifies are sent only to servers explicitly listed using + ``also-notify``. If set to ``no``, no notifies are sent. The ``notify`` option may also be specified in the ``zone`` statement, in which case it overrides the ``options notify`` @@ -2269,7 +2275,7 @@ for details on how to specify IP address lists. global value is overridden. If not specified, the default is to process NOTIFY messages only from - the configured ``masters`` for the zone. ``allow-notify`` can be used + the configured ``primaries`` for the zone. ``allow-notify`` can be used to expand the list of permitted hosts, not to reduce it. ``allow-query`` @@ -2588,7 +2594,7 @@ options apply to zone transfers. than the default of 53. An optional TSIG key can also be specified with each address to cause the notify messages to be signed; this can be useful when sending notifies to multiple views. In place of - explicit addresses, one or more named ``masters`` lists can be used. + explicit addresses, one or more named ``primaries`` lists can be used. If an ``also-notify`` list is given in a ``zone`` statement, it overrides the ``options also-notify`` statement. When a @@ -2729,7 +2735,7 @@ options apply to zone transfers. ``notify-source`` ``notify-source`` determines which local source address, and optionally UDP port, is used to send NOTIFY messages. This - address must appear in the secondary server's ``masters`` zone clause or + address must appear in the secondary server's ``primaries`` zone clause or in an ``allow-notify`` clause. This statement sets the ``notify-source`` for all zones, but can be overridden on a per-zone or per-view basis by including a ``notify-source`` statement within @@ -5103,10 +5109,10 @@ it is an ``in-view`` configuration. Its acceptable values include: ``secondary`` A secondary zone is a replica of a primary zone. Type ``slave`` is a - synonym for ``secondary``. The ``masters`` list specifies one or more IP + synonym for ``secondary``. The ``primaries`` list specifies one or more IP addresses of primary servers that the secondary contacts to update - its copy of the zone. Masters list elements can - also be names of other masters lists. By default, + its copy of the zone. Primaires list elements can + also be names of other primaries lists. By default, transfers are made from port 53 on the servers; this can be changed for all servers by specifying a port number before the list of IP addresses, @@ -5181,7 +5187,7 @@ it is an ``in-view`` configuration. Its acceptable values include: Mirroring a zone other than root requires an explicit list of primary servers to be provided using the - ``masters`` option (see :ref:`masters_grammar` for details), and a + ``primaries`` option (see :ref:`primaries_grammar` for details), and a key-signing key (KSK) for the specified zone to be explicitly configured as a trust anchor. @@ -5273,7 +5279,7 @@ it is an ``in-view`` configuration. Its acceptable values include: Note that the redirect zone supports all possible types; it is not limited to A and AAAA records. - If a redirect zone is configured with a ``masters`` option, then it is + If a redirect zone is configured with a ``primaries`` option, then it is transferred in as if it were a secondary zone. Otherwise, it is loaded from a file as if it were a primary zone. @@ -5416,9 +5422,9 @@ Zone Options ``file`` This sets the zone's filename. In ``primary``, ``hint``, and ``redirect`` - zones which do not have ``masters`` defined, zone data is loaded from + zones which do not have ``primaries`` defined, zone data is loaded from this file. In ``secondary``, ``mirror``, ``stub``, and ``redirect`` zones - which do have ``masters`` defined, zone data is retrieved from + which do have ``primaries`` defined, zone data is retrieved from another server and saved in this file. This option is not applicable to other zone types. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 925ce0db71e..dba0d6d5e4f 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -71,7 +71,7 @@ rst: options ${PERL} rst-grammars.pl options.active controls > controls.grammar.rst ${PERL} rst-grammars.pl options.active key > key.grammar.rst ${PERL} rst-grammars.pl options.active logging > logging.grammar.rst - ${PERL} rst-grammars.pl options.active masters > masters.grammar.rst + ${PERL} rst-grammars.pl options.active primaries > primaries.grammar.rst ${PERL} rst-grammars.pl options.active options > options.grammar.rst ${PERL} rst-grammars.pl options.active server > server.grammar.rst ${PERL} rst-grammars.pl options.active statistics-channels > statistics-channels.grammar.rst diff --git a/doc/misc/master.zoneopt b/doc/misc/master.zoneopt index 335306f210f..527e8b39621 100644 --- a/doc/misc/master.zoneopt +++ b/doc/misc/master.zoneopt @@ -4,7 +4,7 @@ zone [ ] { allow-query-on { ; ... }; allow-transfer { ; ... }; allow-update { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; auto-dnssec ( allow | maintain | off ); diff --git a/doc/misc/master.zoneopt.rst b/doc/misc/master.zoneopt.rst index 722e34b6646..94e2fbf4fe7 100644 --- a/doc/misc/master.zoneopt.rst +++ b/doc/misc/master.zoneopt.rst @@ -6,7 +6,7 @@ allow-query-on { ; ... }; allow-transfer { ; ... }; allow-update { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; auto-dnssec ( allow | maintain | off ); diff --git a/doc/misc/masters.grammar.rst b/doc/misc/masters.grammar.rst deleted file mode 100644 index 45b83450f60..00000000000 --- a/doc/misc/masters.grammar.rst +++ /dev/null @@ -1,6 +0,0 @@ -:: - - masters [ port ] [ dscp - ] { ( | [ - port ] | [ port - ] ) [ key ]; ... }; diff --git a/doc/misc/mirror.zoneopt b/doc/misc/mirror.zoneopt index 6184d371d5a..5c65912f2cf 100644 --- a/doc/misc/mirror.zoneopt +++ b/doc/misc/mirror.zoneopt @@ -5,7 +5,7 @@ zone [ ] { allow-query-on { ; ... }; allow-transfer { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; check-names ( fail | warn | ignore ); @@ -15,7 +15,7 @@ zone [ ] { journal ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-journal-size ( default | unlimited | ); max-records ; max-refresh-time ; @@ -31,6 +31,7 @@ zone [ ] { notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; request-expire ; request-ixfr ; transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/mirror.zoneopt.rst b/doc/misc/mirror.zoneopt.rst index f89a9044878..85151538e35 100644 --- a/doc/misc/mirror.zoneopt.rst +++ b/doc/misc/mirror.zoneopt.rst @@ -7,7 +7,7 @@ allow-query-on { ; ... }; allow-transfer { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; check-names ( fail | warn | ignore ); @@ -17,7 +17,7 @@ journal ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-journal-size ( default | unlimited | ); max-records ; max-refresh-time ; @@ -33,6 +33,7 @@ notify-delay ; notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; request-expire ; request-ixfr ; transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; diff --git a/doc/misc/options b/doc/misc/options index 9322853b306..881bd4cec2c 100644 --- a/doc/misc/options +++ b/doc/misc/options @@ -71,8 +71,8 @@ managed-keys { ( static-key ; ... }; // may occur multiple times, deprecated masters [ port ] [ dscp - ] { ( | [ - port ] | [ port + ] { ( | + [ port ] | [ port ] ) [ key ]; ... }; // may occur multiple times options { @@ -92,7 +92,7 @@ options { allow-update { ; ... }; allow-update-forwarding { ; ... }; allow-v6-synthesis { ; ... }; // obsolete - also-notify [ port ] [ dscp ] { ( | + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) @@ -110,7 +110,7 @@ options { blackhole { ; ... }; cache-file ; catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port + [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; @@ -416,6 +416,11 @@ options { plugin ( query ) [ { } ]; // may occur multiple times +primaries [ port ] [ dscp + ] { ( | + [ port ] | [ port + ] ) [ key ]; ... }; // may occur multiple times + server { bogus ; edns ; @@ -484,7 +489,7 @@ view [ ] { allow-update { ; ... }; allow-update-forwarding { ; ... }; allow-v6-synthesis { ; ... }; // obsolete - also-notify [ port ] [ dscp ] { ( | + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) @@ -496,7 +501,7 @@ view [ ] { auto-dnssec ( allow | maintain | off ); cache-file ; catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port + [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; @@ -781,7 +786,7 @@ view [ ] { allow-update { ; ... }; allow-update-forwarding { ; ... }; also-notify [ port ] [ dscp ] { ( - | [ port ] | + | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( @@ -824,9 +829,10 @@ view [ ] { maintain-ixfr-base ; // ancient masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( - | [ port ] | [ - port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( + | [ port ] | + [ port ] ) [ key ]; + ... }; max-ixfr-log-size ( default | unlimited | ); // ancient max-journal-size ( default | unlimited | ); @@ -849,6 +855,10 @@ view [ ] { | * ) ] [ dscp ]; notify-to-soa ; nsec3-test-zone ; // test only + primaries [ port ] [ dscp ] { ( + | [ port ] | + [ port ] ) [ key ]; + ... }; pubkey ; // ancient request-expire ; @@ -888,7 +898,7 @@ zone [ ] { allow-transfer { ; ... }; allow-update { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) @@ -929,7 +939,7 @@ zone [ ] { maintain-ixfr-base ; // ancient masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-ixfr-log-size ( default | unlimited | ); // ancient @@ -953,6 +963,9 @@ zone [ ] { [ dscp ]; notify-to-soa ; nsec3-test-zone ; // test only + primaries [ port ] [ dscp ] { ( | + [ port ] | [ port + ] ) [ key ]; ... }; pubkey ; // ancient request-expire ; request-ixfr ; diff --git a/doc/misc/options.active b/doc/misc/options.active index 17b66609d9c..737efd1449b 100644 --- a/doc/misc/options.active +++ b/doc/misc/options.active @@ -68,8 +68,8 @@ managed-keys { ( static-key ; ... }; // may occur multiple times, deprecated masters [ port ] [ dscp - ] { ( | [ - port ] | [ port + ] { ( | + [ port ] | [ port ] ) [ key ]; ... }; // may occur multiple times options { @@ -84,7 +84,7 @@ options { allow-transfer { ; ... }; allow-update { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) @@ -102,7 +102,7 @@ options { blackhole { ; ... }; cache-file ; catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port + [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; @@ -372,6 +372,11 @@ options { plugin ( query ) [ { } ]; // may occur multiple times +primaries [ port ] [ dscp + ] { ( | + [ port ] | [ port + ] ) [ key ]; ... }; // may occur multiple times + server { bogus ; edns ; @@ -433,7 +438,7 @@ view [ ] { allow-transfer { ; ... }; allow-update { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) @@ -445,7 +450,7 @@ view [ ] { auto-dnssec ( allow | maintain | off ); cache-file ; catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port + [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; @@ -706,7 +711,7 @@ view [ ] { allow-update { ; ... }; allow-update-forwarding { ; ... }; also-notify [ port ] [ dscp ] { ( - | [ port ] | + | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( @@ -746,7 +751,7 @@ view [ ] { key-directory ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-journal-size ( default | unlimited | ); @@ -768,6 +773,10 @@ view [ ] { notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; notify-to-soa ; + primaries [ port ] [ dscp ] { ( + | [ port ] | + [ port ] ) [ key ]; + ... }; request-expire ; request-ixfr ; serial-update-method ( date | increment | unixtime ); @@ -805,7 +814,7 @@ zone [ ] { allow-transfer { ; ... }; allow-update { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) @@ -843,7 +852,7 @@ zone [ ] { key-directory ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-journal-size ( default | unlimited | ); @@ -865,6 +874,9 @@ zone [ ] { notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; notify-to-soa ; + primaries [ port ] [ dscp ] { ( | + [ port ] | [ port + ] ) [ key ]; ... }; request-expire ; request-ixfr ; serial-update-method ( date | increment | unixtime ); diff --git a/doc/misc/options.grammar.rst b/doc/misc/options.grammar.rst index c4f27696632..662b7dfbd4c 100644 --- a/doc/misc/options.grammar.rst +++ b/doc/misc/options.grammar.rst @@ -12,7 +12,7 @@ allow-transfer { ; ... }; allow-update { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) @@ -30,7 +30,7 @@ blackhole { ; ... }; cache-file ; catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port + [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... } ] [ zone-directory ] [ in-memory ] [ min-update-interval ]; ... }; diff --git a/doc/misc/primaries.grammar.rst b/doc/misc/primaries.grammar.rst new file mode 100644 index 00000000000..2f6ba537d86 --- /dev/null +++ b/doc/misc/primaries.grammar.rst @@ -0,0 +1,6 @@ +:: + + primaries [ port ] [ dscp + ] { ( | + [ port ] | [ port + ] ) [ key ]; ... }; diff --git a/doc/misc/redirect.zoneopt b/doc/misc/redirect.zoneopt index 2a755de9d84..40df0e5b9c9 100644 --- a/doc/misc/redirect.zoneopt +++ b/doc/misc/redirect.zoneopt @@ -6,8 +6,9 @@ zone [ ] { file ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-records ; max-zone-ttl ( unlimited | ); + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; zone-statistics ( full | terse | none | ); }; diff --git a/doc/misc/redirect.zoneopt.rst b/doc/misc/redirect.zoneopt.rst index 2ec9046f0fd..5a08a22e3c2 100644 --- a/doc/misc/redirect.zoneopt.rst +++ b/doc/misc/redirect.zoneopt.rst @@ -8,8 +8,9 @@ file ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-records ; max-zone-ttl ( unlimited | ); + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; zone-statistics ( full | terse | none | ); }; diff --git a/doc/misc/slave.zoneopt b/doc/misc/slave.zoneopt index 2dc3fd535c0..987bc01d22c 100644 --- a/doc/misc/slave.zoneopt +++ b/doc/misc/slave.zoneopt @@ -5,7 +5,7 @@ zone [ ] { allow-query-on { ; ... }; allow-transfer { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; auto-dnssec ( allow | maintain | off ); @@ -27,7 +27,7 @@ zone [ ] { key-directory ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-journal-size ( default | unlimited | ); max-records ; max-refresh-time ; @@ -44,6 +44,7 @@ zone [ ] { notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; notify-to-soa ; + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; request-expire ; request-ixfr ; sig-signing-nodes ; diff --git a/doc/misc/slave.zoneopt.rst b/doc/misc/slave.zoneopt.rst index dc74dcb359a..b81468dbc10 100644 --- a/doc/misc/slave.zoneopt.rst +++ b/doc/misc/slave.zoneopt.rst @@ -7,7 +7,7 @@ allow-query-on { ; ... }; allow-transfer { ; ... }; allow-update-forwarding { ; ... }; - also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + also-notify [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; alt-transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; alt-transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; auto-dnssec ( allow | maintain | off ); @@ -29,7 +29,7 @@ key-directory ; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-journal-size ( default | unlimited | ); max-records ; max-refresh-time ; @@ -46,6 +46,7 @@ notify-source ( | * ) [ port ( | * ) ] [ dscp ]; notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; notify-to-soa ; + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; request-expire ; request-ixfr ; sig-signing-nodes ; diff --git a/doc/misc/stub.zoneopt b/doc/misc/stub.zoneopt index b18b1029122..d7c583bbb10 100644 --- a/doc/misc/stub.zoneopt +++ b/doc/misc/stub.zoneopt @@ -11,7 +11,7 @@ zone [ ] { forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-records ; max-refresh-time ; max-retry-time ; @@ -20,6 +20,7 @@ zone [ ] { min-refresh-time ; min-retry-time ; multi-master ; + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; use-alt-transfer-source ; diff --git a/doc/misc/stub.zoneopt.rst b/doc/misc/stub.zoneopt.rst index 7357617f256..02e7cc8d356 100644 --- a/doc/misc/stub.zoneopt.rst +++ b/doc/misc/stub.zoneopt.rst @@ -13,7 +13,7 @@ forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; masterfile-format ( map | raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; + masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; max-records ; max-refresh-time ; max-retry-time ; @@ -22,6 +22,7 @@ min-refresh-time ; min-retry-time ; multi-master ; + primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ]; ... }; transfer-source ( | * ) [ port ( | * ) ] [ dscp ]; transfer-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; use-alt-transfer-source ; diff --git a/lib/bind9/check.c b/lib/bind9/check.c index b2dee8f6181..c878d53c814 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -1658,17 +1658,21 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx, } static isc_result_t -get_masters_def(const cfg_obj_t *cctx, const char *name, - const cfg_obj_t **ret) { +get_primaries_def(const cfg_obj_t *cctx, const char *name, + const cfg_obj_t **ret) { isc_result_t result; - const cfg_obj_t *masters = NULL; + const cfg_obj_t *primaries = NULL; const cfg_listelt_t *elt; - result = cfg_map_get(cctx, "masters", &masters); + result = cfg_map_get(cctx, "primaries", &primaries); + if (result != ISC_R_SUCCESS) { + result = cfg_map_get(cctx, "masters", &primaries); + } if (result != ISC_R_SUCCESS) { return (result); } - for (elt = cfg_list_first(masters); elt != NULL; + + for (elt = cfg_list_first(primaries); elt != NULL; elt = cfg_list_next(elt)) { const cfg_obj_t *list; const char *listname; @@ -1685,8 +1689,8 @@ get_masters_def(const cfg_obj_t *cctx, const char *name, } static isc_result_t -validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config, - uint32_t *countp, isc_log_t *logctx, isc_mem_t *mctx) { +validate_primaries(const cfg_obj_t *obj, const cfg_obj_t *config, + uint32_t *countp, isc_log_t *logctx, isc_mem_t *mctx) { isc_result_t result = ISC_R_SUCCESS; isc_result_t tresult; uint32_t count = 0; @@ -1713,8 +1717,8 @@ resume: const cfg_obj_t *addr; const cfg_obj_t *key; - addr = cfg_tuple_get(cfg_listelt_value(element), "masterselemen" - "t"); + addr = cfg_tuple_get(cfg_listelt_value(element), + "primarieselement"); key = cfg_tuple_get(cfg_listelt_value(element), "key"); if (cfg_obj_issockaddr(addr)) { @@ -1736,13 +1740,13 @@ resume: if (tresult == ISC_R_EXISTS) { continue; } - tresult = get_masters_def(config, listname, &obj); + tresult = get_primaries_def(config, listname, &obj); if (tresult != ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) { result = tresult; } cfg_obj_log(addr, logctx, ISC_LOG_ERROR, - "unable to find masters list '%s'", + "unable to find primaries list '%s'", listname); continue; } @@ -2447,8 +2451,8 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, } if (tresult == ISC_R_SUCCESS && donotify) { uint32_t count; - tresult = validate_masters(obj, config, &count, logctx, - mctx); + tresult = validate_primaries(obj, config, &count, + logctx, mctx); if (tresult != ISC_R_SUCCESS && result == ISC_R_SUCCESS) { result = tresult; @@ -2457,7 +2461,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, } /* - * Slave, mirror, and stub zones must have a "masters" field, with one + * Slave, mirror, and stub zones must have a "primaries" field, with one * exception: when mirroring the root zone, a default, built-in master * server list is used in the absence of one explicitly specified. */ @@ -2466,22 +2470,39 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions, !dns_name_equal(zname, dns_rootname))) { obj = NULL; - if (cfg_map_get(zoptions, "masters", &obj) != ISC_R_SUCCESS) { + (void)cfg_map_get(zoptions, "primaries", &obj); + if (obj == NULL) { + /* If "primaries" was unset, check for "masters" */ + (void)cfg_map_get(zoptions, "masters", &obj); + } else { + const cfg_obj_t *obj2 = NULL; + + /* ...bug if it was set, "masters" must not be. */ + (void)cfg_map_get(zoptions, "masters", &obj2); + if (obj2 != NULL) { + cfg_obj_log(obj, logctx, ISC_LOG_ERROR, + "'primaries' and 'masters' cannot " + "both be used in the same zone"); + result = ISC_R_FAILURE; + } + } + if (obj == NULL) { cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR, - "zone '%s': missing 'masters' entry", + "zone '%s': missing 'primaries' entry", znamestr); result = ISC_R_FAILURE; } else { uint32_t count; - tresult = validate_masters(obj, config, &count, logctx, - mctx); + tresult = validate_primaries(obj, config, &count, + logctx, mctx); if (tresult != ISC_R_SUCCESS && result == ISC_R_SUCCESS) { result = tresult; } if (tresult == ISC_R_SUCCESS && count == 0) { cfg_obj_log(zoptions, logctx, ISC_LOG_ERROR, - "zone '%s': empty 'masters' entry", + "zone '%s': " + "empty 'primaries' entry", znamestr); result = ISC_R_FAILURE; } diff --git a/lib/dns/include/dns/zone.h b/lib/dns/include/dns/zone.h index 12160448e4d..d61322bc9c6 100644 --- a/lib/dns/include/dns/zone.h +++ b/lib/dns/include/dns/zone.h @@ -58,10 +58,11 @@ typedef enum { DNS_ZONEOPT_NOMERGE = 1 << 2, /*%< don't merge journal */ DNS_ZONEOPT_CHECKNS = 1 << 3, /*%< check if NS's are addresses */ DNS_ZONEOPT_FATALNS = 1 << 4, /*%< DNS_ZONEOPT_CHECKNS is fatal */ - DNS_ZONEOPT_MULTIMASTER = 1 << 5, /*%< this zone has multiple masters */ - DNS_ZONEOPT_USEALTXFRSRC = 1 << 6, /*%< use alternate transfer sources - */ - DNS_ZONEOPT_CHECKNAMES = 1 << 7, /*%< check-names */ + DNS_ZONEOPT_MULTIMASTER = 1 << 5, /*%< this zone has multiple + primaries */ + DNS_ZONEOPT_USEALTXFRSRC = 1 << 6, /*%< use alternate transfer sources + */ + DNS_ZONEOPT_CHECKNAMES = 1 << 7, /*%< check-names */ DNS_ZONEOPT_CHECKNAMESFAIL = 1 << 8, /*%< fatal check-name failures */ DNS_ZONEOPT_CHECKWILDCARD = 1 << 9, /*%< check for internal wildcards */ DNS_ZONEOPT_CHECKMX = 1 << 10, /*%< check-mx */ @@ -606,24 +607,24 @@ dns_zone_maintenance(dns_zone_t *zone); */ isc_result_t -dns_zone_setmasters(dns_zone_t *zone, const isc_sockaddr_t *masters, - uint32_t count); +dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *primaries, + uint32_t count); isc_result_t -dns_zone_setmasterswithkeys(dns_zone_t *zone, const isc_sockaddr_t *masters, - dns_name_t **keynames, uint32_t count); +dns_zone_setprimarieswithkeys(dns_zone_t *zone, const isc_sockaddr_t *primaries, + dns_name_t **keynames, uint32_t count); /*%< * Set the list of master servers for the zone. * * Require: *\li 'zone' to be a valid zone. - *\li 'masters' array of isc_sockaddr_t with port set or NULL. - *\li 'count' the number of masters. + *\li 'primaries' array of isc_sockaddr_t with port set or NULL. + *\li 'count' the number of primaries. *\li 'keynames' array of dns_name_t's for tsig keys or NULL. * - * \li dns_zone_setmasters() is just a wrapper to setmasterswithkeys(), + * \li dns_zone_setprimaries() is just a wrapper to setprimarieswithkeys(), * passing NULL in the keynames field. * - * \li If 'masters' is NULL then 'count' must be zero. + * \li If 'primaries' is NULL then 'count' must be zero. * * Returns: *\li #ISC_R_SUCCESS @@ -1559,7 +1560,7 @@ dns_zone_forwardupdate(dns_zone_t *zone, dns_message_t *msg, dns_updatecallback_t callback, void *callback_arg); /*%< * Forward 'msg' to each master in turn until we get an answer or we - * have exhausted the list of masters. 'callback' will be called with + * have exhausted the list of primaries. 'callback' will be called with * ISC_R_SUCCESS if we get an answer and the returned message will be * passed as 'answer_message', otherwise a non ISC_R_SUCCESS result code * will be passed and answer_message will be NULL. The callback function diff --git a/lib/dns/win32/libdns.def.in b/lib/dns/win32/libdns.def.in index 443b2f97df1..040e8d12807 100644 --- a/lib/dns/win32/libdns.def.in +++ b/lib/dns/win32/libdns.def.in @@ -1329,8 +1329,6 @@ dns_zone_setkasp dns_zone_setkeydirectory dns_zone_setkeyopt dns_zone_setkeyvalidityinterval -dns_zone_setmasters -dns_zone_setmasterswithkeys dns_zone_setmaxrecords dns_zone_setmaxrefreshtime dns_zone_setmaxretrytime @@ -1350,6 +1348,8 @@ dns_zone_setnotifytype dns_zone_setnsec3param dns_zone_setoption dns_zone_setorigin +dns_zone_setprimaries +dns_zone_setprimarieswithkeys dns_zone_setprivatetype dns_zone_setqueryacl dns_zone_setqueryonacl diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 002ca46b70d..029311c52e9 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -472,7 +472,7 @@ typedef enum { DNS_ZONEFLG_DIFFONRELOAD = 0x00000800U, /*%< generate a journal diff on * reload */ DNS_ZONEFLG_NOMASTERS = 0x00001000U, /*%< an attempt to refresh a - * zone with no masters + * zone with no primaries * occurred */ DNS_ZONEFLG_LOADING = 0x00002000U, /*%< load from disk in progress*/ DNS_ZONEFLG_HAVETIMERS = 0x00004000U, /*%< timer values have been set @@ -1294,7 +1294,7 @@ zone_free(dns_zone_t *zone) { dns_catz_catzs_detach(&zone->catzs); } zone_freedbargs(zone); - RUNTIME_CHECK(dns_zone_setmasterswithkeys(zone, NULL, NULL, 0) == + RUNTIME_CHECK(dns_zone_setprimarieswithkeys(zone, NULL, NULL, 0) == ISC_R_SUCCESS); RUNTIME_CHECK(dns_zone_setalsonotify(zone, NULL, 0) == ISC_R_SUCCESS); zone->check_names = dns_severity_ignore; @@ -6306,17 +6306,17 @@ unlock: } isc_result_t -dns_zone_setmasters(dns_zone_t *zone, const isc_sockaddr_t *masters, - uint32_t count) { +dns_zone_setprimaries(dns_zone_t *zone, const isc_sockaddr_t *masters, + uint32_t count) { isc_result_t result; - result = dns_zone_setmasterswithkeys(zone, masters, NULL, count); + result = dns_zone_setprimarieswithkeys(zone, masters, NULL, count); return (result); } isc_result_t -dns_zone_setmasterswithkeys(dns_zone_t *zone, const isc_sockaddr_t *masters, - dns_name_t **keynames, uint32_t count) { +dns_zone_setprimarieswithkeys(dns_zone_t *zone, const isc_sockaddr_t *masters, + dns_name_t **keynames, uint32_t count) { isc_result_t result = ISC_R_SUCCESS; isc_sockaddr_t *newaddrs = NULL; isc_dscp_t *newdscps = NULL; @@ -6332,9 +6332,9 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, const isc_sockaddr_t *masters, LOCK_ZONE(zone); /* - * The refresh code assumes that 'masters' wouldn't change under it. + * The refresh code assumes that 'primaries' wouldn't change under it. * If it will change then kill off any current refresh in progress - * and update the masters info. If it won't change then we can just + * and update the primaries info. If it won't change then we can just * unlock and exit. */ if (count != zone->masterscnt || @@ -6377,7 +6377,7 @@ dns_zone_setmasterswithkeys(dns_zone_t *zone, const isc_sockaddr_t *masters, } /* - * Now set up the masters and masterkey lists + * Now set up the primaries and primary key lists */ result = set_addrkeylist(count, masters, &newaddrs, NULL, &newdscps, keynames, &newnames, zone->mctx); @@ -11027,7 +11027,8 @@ zone_maintenance(dns_zone_t *zone) { } /* - * Slaves send notifies before backing up to disk, masters after. + * Secondaries send notifies before backing up to disk, + * primaries after. */ if ((zone->type == dns_zone_slave || zone->type == dns_zone_mirror) && (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) || @@ -11288,7 +11289,7 @@ dns_zone_refresh(dns_zone_t *zone) { DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOMASTERS); if ((oldflags & DNS_ZONEFLG_NOMASTERS) == 0) { dns_zone_log(zone, ISC_LOG_ERROR, - "cannot refresh: no masters"); + "cannot refresh: no primaries"); } goto unlock; } @@ -13298,7 +13299,7 @@ next_master: !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) { /* - * Did we get a good answer from all the masters? + * Did we get a good answer from all the primaries? */ for (j = 0; j < zone->masterscnt; j++) { if (!zone->mastersok[j]) { @@ -13820,7 +13821,7 @@ next_master: !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_USEALTXFRSRC)) { /* - * Did we get a good answer from all the masters? + * Did we get a good answer from all the primaries? */ for (j = 0; j < zone->masterscnt; j++) { if (!zone->mastersok[j]) { @@ -17706,7 +17707,7 @@ forward_callback(isc_task_t *task, isc_event_t *event) { break; } - /* These should not occur if the masters/zone are valid. */ + /* These should not occur if the primaries/zone are valid. */ case dns_rcode_notzone: case dns_rcode_notauth: { char rcode[128]; diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 7c9a6a8cd0c..01995a673af 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -98,7 +98,7 @@ static cfg_type_t cfg_type_logging; static cfg_type_t cfg_type_logseverity; static cfg_type_t cfg_type_logsuffix; static cfg_type_t cfg_type_logversions; -static cfg_type_t cfg_type_masterselement; +static cfg_type_t cfg_type_primarieselement; static cfg_type_t cfg_type_maxduration; static cfg_type_t cfg_type_minimal; static cfg_type_t cfg_type_nameportiplist; @@ -166,8 +166,8 @@ static cfg_type_t cfg_type_acl = { "acl", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple, &cfg_rep_tuple, acl_fields }; -/*% masters */ -static cfg_tuplefielddef_t masters_fields[] = { +/*% primaries */ +static cfg_tuplefielddef_t primaries_fields[] = { { "name", &cfg_type_astring, 0 }, { "port", &cfg_type_optional_port, 0 }, { "dscp", &cfg_type_optional_dscp, 0 }, @@ -175,19 +175,19 @@ static cfg_tuplefielddef_t masters_fields[] = { { NULL, NULL, 0 } }; -static cfg_type_t cfg_type_masters = { "masters", cfg_parse_tuple, - cfg_print_tuple, cfg_doc_tuple, - &cfg_rep_tuple, masters_fields }; +static cfg_type_t cfg_type_primaries = { "primaries", cfg_parse_tuple, + cfg_print_tuple, cfg_doc_tuple, + &cfg_rep_tuple, primaries_fields }; /*% * "sockaddrkeylist", a list of socket addresses with optional keys - * and an optional default port, as used in the masters option. + * and an optional default port, as used in the primaries option. * E.g., - * "port 1234 { mymasters; 10.0.0.1 key foo; 1::2 port 69; }" + * "port 1234 { myprimaries; 10.0.0.1 key foo; 1::2 port 69; }" */ static cfg_tuplefielddef_t namesockaddrkey_fields[] = { - { "masterselement", &cfg_type_masterselement, 0 }, + { "primarieselement", &cfg_type_primarieselement, 0 }, { "key", &cfg_type_optional_keyref, 0 }, { NULL, NULL, 0 }, }; @@ -1100,8 +1100,9 @@ static cfg_clausedef_t namedconf_clauses[] = { { "logging", &cfg_type_logging, 0 }, { "lwres", &cfg_type_bracketed_text, CFG_CLAUSEFLAG_MULTI | CFG_CLAUSEFLAG_OBSOLETE }, - { "masters", &cfg_type_masters, CFG_CLAUSEFLAG_MULTI }, + { "masters", &cfg_type_primaries, CFG_CLAUSEFLAG_MULTI }, { "options", &cfg_type_options, 0 }, + { "primaries", &cfg_type_primaries, CFG_CLAUSEFLAG_MULTI }, { "statistics-channels", &cfg_type_statschannels, CFG_CLAUSEFLAG_MULTI }, { "view", &cfg_type_view, CFG_CLAUSEFLAG_MULTI }, @@ -2308,6 +2309,9 @@ static cfg_clausedef_t zone_only_clauses[] = { { "masters", &cfg_type_namesockaddrkeylist, CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB | CFG_ZONE_REDIRECT }, + { "primaries", &cfg_type_namesockaddrkeylist, + CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB | + CFG_ZONE_REDIRECT }, { "pubkey", &cfg_type_pubkey, CFG_CLAUSEFLAG_ANCIENT }, { "server-addresses", &cfg_type_bracketed_netaddrlist, CFG_ZONE_STATICSTUB }, @@ -3632,14 +3636,14 @@ static cfg_type_t cfg_type_nameportiplist = { }; /*% - * masters element. + * primaries element. */ static void -doc_masterselement(cfg_printer_t *pctx, const cfg_type_t *type) { +doc_primarieselement(cfg_printer_t *pctx, const cfg_type_t *type) { UNUSED(type); cfg_print_cstr(pctx, "( "); - cfg_print_cstr(pctx, ""); + cfg_print_cstr(pctx, ""); cfg_print_cstr(pctx, " | "); cfg_print_cstr(pctx, ""); cfg_print_cstr(pctx, " "); @@ -3652,8 +3656,8 @@ doc_masterselement(cfg_printer_t *pctx, const cfg_type_t *type) { } static isc_result_t -parse_masterselement(cfg_parser_t *pctx, const cfg_type_t *type, - cfg_obj_t **ret) { +parse_primarieselement(cfg_parser_t *pctx, const cfg_type_t *type, + cfg_obj_t **ret) { isc_result_t result; cfg_obj_t *obj = NULL; UNUSED(type); @@ -3671,7 +3675,7 @@ parse_masterselement(cfg_parser_t *pctx, const cfg_type_t *type, } } else { cfg_parser_error(pctx, CFG_LOG_NEAR, - "expected IP address or masters name"); + "expected IP address or primaries list name"); return (ISC_R_UNEXPECTEDTOKEN); } cleanup: @@ -3679,12 +3683,12 @@ cleanup: return (result); } -static cfg_type_t cfg_type_masterselement = { "masters_element", - parse_masterselement, - NULL, - doc_masterselement, - NULL, - NULL }; +static cfg_type_t cfg_type_primarieselement = { "primaries_element", + parse_primarieselement, + NULL, + doc_primarieselement, + NULL, + NULL }; static int cmp_clause(const void *ap, const void *bp) {