+4848. [func] Zone types "primary" and "secondary" can now be used
+ as synonyms for "master" and "slave" in named.conf.
+ [RT #46713]
+
4847. [bug] dnssec-dnskey-kskonly was not being honoured for
CDS and CDNSKEY. [RT #46755]
element = cfg_list_next(element)) {
value = cfg_listelt_value(element);
type = cfg_tuple_get(value, "type");
- if (strcasecmp(cfg_obj_asstring(type), "master") != 0)
+ if ((strcasecmp(cfg_obj_asstring(type),
+ "primary") != 0) &&
+ (strcasecmp(cfg_obj_asstring(type),
+ "master") != 0))
+ {
continue;
+ }
*obj = cfg_tuple_get(value, "mode");
return (ISC_TRUE);
}
* Skip loading checks for any type other than
* master and redirect
*/
- if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0)
+ if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0) {
return (configure_hint(zfile, zclass, mctx));
- else if ((strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
- (strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
+ } else if ((strcasecmp(cfg_obj_asstring(typeobj), "primary") != 0) &&
+ (strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
+ (strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
+ {
return (ISC_R_SUCCESS);
+ }
/*
* Is the redirect zone configured as a slave?
const char *str;
str = cfg_obj_asstring(zonetypeobj);
- if (strcasecmp(str, "master") == 0)
+ if (strcasecmp(str, "primary") == 0 ||
+ strcasecmp(str, "master") == 0)
+ {
ztype = dns_zone_master;
- else if (strcasecmp(str, "slave") == 0)
+ } else if (strcasecmp(str, "secondary") == 0 ||
+ strcasecmp(str, "slave") == 0)
+ {
ztype = dns_zone_slave;
- else if (strcasecmp(str, "stub") == 0)
+ } else if (strcasecmp(str, "stub") == 0) {
ztype = dns_zone_stub;
- else if (strcasecmp(str, "static-stub") == 0)
+ } else if (strcasecmp(str, "static-stub") == 0) {
ztype = dns_zone_staticstub;
- else if (strcasecmp(str, "redirect") == 0)
+ } else if (strcasecmp(str, "redirect") == 0) {
ztype = dns_zone_redirect;
- else
+ } else {
INSIST(0);
+ }
return (ztype);
}
dns_zone_setadded(zone, added);
signing = NULL;
- if ((strcasecmp(ztypestr, "master") == 0 ||
+ if ((strcasecmp(ztypestr, "primary") == 0 ||
+ strcasecmp(ztypestr, "master") == 0 ||
+ strcasecmp(ztypestr, "secondary") == 0 ||
strcasecmp(ztypestr, "slave") == 0) &&
cfg_map_get(zoptions, "inline-signing", &signing) == ISC_R_SUCCESS &&
cfg_obj_asboolean(signing))
obj = NULL;
result = named_config_get(maps, "ixfr-from-differences", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
- if (cfg_obj_isboolean(obj))
+ if (cfg_obj_isboolean(obj)) {
ixfrdiff = cfg_obj_asboolean(obj);
- else if (!strcasecmp(cfg_obj_asstring(obj), "master") &&
- ztype == dns_zone_master)
+ } else if (!strcasecmp(cfg_obj_asstring(obj), "primary") &&
+ !strcasecmp(cfg_obj_asstring(obj), "master") &&
+ ztype == dns_zone_master)
+ {
ixfrdiff = ISC_TRUE;
- else if (!strcasecmp(cfg_obj_asstring(obj), "slave") &&
- ztype == dns_zone_slave)
+ } else if (!strcasecmp(cfg_obj_asstring(obj), "secondary") &&
+ !strcasecmp(cfg_obj_asstring(obj), "slave") &&
+ ztype == dns_zone_slave)
+ {
ixfrdiff = ISC_TRUE;
- else
+ } else {
ixfrdiff = ISC_FALSE;
+ }
if (raw != NULL) {
dns_zone_setoption(raw, DNS_ZONEOPT_IXFRFROMDIFFS,
ISC_TRUE);
file "file";
auto-dnssec maintain;
};
+ zone "p" {
+ type primary;
+ file "pfile";
+ };
+ zone "s" {
+ type secondary;
+ masters {
+ 1.2.3.4;
+ };
+ };
allow-update {
"any";
};
. IN second redirect
clone IN third in-view first
dnssec IN third master
+p IN third primary
+s IN third secondary
hostname.bind chaos chaos master
match-clients { any; };
zone "master.example" {
- type master;
+ type primary;
file "master.db";
allow-update { any; };
allow-transfer { any; };
};
zone "master.example" {
- type slave;
+ type secondary;
masters { 10.53.0.1; };
file "slave.db";
};
difference set.
</para>
<para><command>ixfr-from-differences</command>
- also accepts <command>master</command> and
- <command>slave</command> at the view and options
- levels which causes
+ also accepts <command>master</command> (or
+ <command>primary</command>) and
+ <command>slave</command> (or <command>secondary</command>)
+ at the view and options levels, which causes
<command>ixfr-from-differences</command> to be enabled for
- all <command>master</command> or
- <command>slave</command> zones respectively.
- It is off by default.
+ all primary or secondary zones, respectively.
+ It is off for all zones by default.
</para>
</listitem>
</varlistentry>
Statement Grammar</title></info>
<programlisting><command>zone</command> <replaceable>zone_name</replaceable> [ <replaceable>class</replaceable> ] <command>{</command>
- <command>type</command> master ;
+ <command>type</command> ( master | primary );
[ <command>allow-query</command> <command>{</command> <replaceable>address_match_list</replaceable> <command>}</command> ; ]
[ <command>allow-query-on</command> <command>{</command> <replaceable>address_match_list</replaceable> <command>}</command> ; ]
[ <command>allow-transfer</command> <command>{</command> <replaceable>address_match_list</replaceable> <command>}</command> ; ]
<command>}</command> ;
<command>zone</command> <replaceable>zone_name</replaceable> [ <replaceable>class</replaceable> ] <command>{</command>
- <command>type</command> slave ;
+ <command>type</command> (slave | secondary);
[ <command>allow-notify</command> <command>{</command> <replaceable>address_match_list</replaceable> <command>}</command> ; ]
[ <command>allow-query</command> <command>{</command> <replaceable>address_match_list</replaceable> <command>}</command> ; ]
[ <command>allow-query-on</command> <command>{</command> <replaceable>address_match_list</replaceable> <command>}</command> ; ]
The <command>type</command> keyword is required
for the <command>zone</command> configuration unless
it is an <command>in-view</command> configuration. Its
- acceptable values include: <varname>delegation-only</varname>,
- <varname>forward</varname>, <varname>hint</varname>,
- <varname>master</varname>, <varname>redirect</varname>,
- <varname>slave</varname>, <varname>static-stub</varname>,
+ acceptable values include:
+ <varname>master</varname> (or <varname>primary</varname>),
+ <varname>slave</varname> (or <varname>secondary</varname>),
+ <varname>delegation-only</varname>,
+ <varname>forward</varname>,
+ <varname>hint</varname>,
+ <varname>redirect</varname>,
+ <varname>static-stub</varname>,
and <varname>stub</varname>.
</para>
<para>
The server has a master copy of the data
for the zone and will be able to provide authoritative
- answers for
- it.
+ answers for it. Type <varname>primary</varname> is
+ a synonym for <varname>master</varname>.
</para>
</entry>
</row>
<entry colname="2">
<para>
A slave zone is a replica of a master
- zone. The <command>masters</command> list
+ zone. Type <varname>secondary</varname> is a
+ synonym for <varname>slave</varname>.
+ The <command>masters</command> list
specifies one or more IP addresses
of master servers that the slave contacts to update
its copy of the zone.
<itemizedlist>
<listitem>
<para>
- None.
+ Zone types <command>primary</command> and
+ <command>secondary</command> are now available as synonyms for
+ <command>master</command> and <command>slave</command>,
+ respectively, in <filename>named.conf</filename>.
</para>
</listitem>
</itemizedlist>
}
typestr = cfg_obj_asstring(obj);
- if (strcasecmp(typestr, "master") == 0)
+ if (strcasecmp(typestr, "master") == 0 ||
+ strcasecmp(typestr, "primary") == 0)
+ {
ztype = MASTERZONE;
- else if (strcasecmp(typestr, "slave") == 0)
+ } else if (strcasecmp(typestr, "slave") == 0 ||
+ strcasecmp(typestr, "secondary") == 0)
+ {
ztype = SLAVEZONE;
- else if (strcasecmp(typestr, "stub") == 0)
+ } else if (strcasecmp(typestr, "stub") == 0) {
ztype = STUBZONE;
- else if (strcasecmp(typestr, "static-stub") == 0)
+ } else if (strcasecmp(typestr, "static-stub") == 0) {
ztype = STATICSTUBZONE;
- else if (strcasecmp(typestr, "forward") == 0)
+ } else if (strcasecmp(typestr, "forward") == 0) {
ztype = FORWARDZONE;
- else if (strcasecmp(typestr, "hint") == 0)
+ } else if (strcasecmp(typestr, "hint") == 0) {
ztype = HINTZONE;
- else if (strcasecmp(typestr, "delegation-only") == 0)
+ } else if (strcasecmp(typestr, "delegation-only") == 0) {
ztype = DELEGATIONZONE;
- else if (strcasecmp(typestr, "redirect") == 0)
+ } else if (strcasecmp(typestr, "redirect") == 0) {
ztype = REDIRECTZONE;
- else {
+ } else {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"zone '%s': invalid type %s",
znamestr, typestr);
if (obj != NULL)
zonetype = cfg_obj_asstring(obj);
}
- if (strcasecmp(zonetype, "master") != 0 &&
- strcasecmp(zonetype, "slave") != 0) {
+ if (strcasecmp(zonetype, "primary") != 0 &&
+ strcasecmp(zonetype, "master") != 0 &&
+ strcasecmp(zonetype, "secondary") != 0 &&
+ strcasecmp(zonetype, "slave") != 0)
+ {
cfg_obj_log(nameobj, logctx, ISC_LOG_ERROR,
"%s '%s'%s%s is not a master or slave zone",
rpz_catz, zonename, forview, viewname);
* "check-names" option has a different syntax.
*/
-static const char *checktype_enums[] = { "master", "slave", "response", NULL };
+static const char *checktype_enums[] = {
+ "primary", "master", "secondary", "slave", "response", NULL
+};
static cfg_type_t cfg_type_checktype = {
"checktype", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, &checktype_enums
};
static const char *zonetype_enums[] = {
- "delegation-only", "forward", "hint", "master", "redirect",
- "slave", "static-stub", "stub", NULL
+ "primary", "master", "secondary", "slave",
+ "delegation-only", "forward", "hint", "redirect",
+ "static-stub", "stub", NULL
};
static cfg_type_t cfg_type_zonetype = {
"zonetype", cfg_parse_enum, cfg_print_ustring, cfg_doc_enum,
&cfg_rep_string, minimal_enums,
};
-static const char *ixfrdiff_enums[] = { "master", "slave", NULL };
+static const char *ixfrdiff_enums[] = {
+ "primary", "master", "secondary", "slave", NULL
+};
static isc_result_t
parse_ixfrdiff_type(cfg_parser_t *pctx, const cfg_type_t *type,
cfg_obj_t **ret)