Merge branch '1944-primary-secondary' into 'main'

update to primary/secondary terminology internally

Closes #1944

See merge request isc-projects/bind9!5366
This commit is contained in:
Evan Hunt 2021-08-30 18:30:22 +00:00
commit 35f2fa7fd5
23 changed files with 272 additions and 256 deletions

View file

@ -1,3 +1,8 @@
5709. [func] Zone types are now reported in the statistics channel
using "primary" and "secondary". Enum values
throughout the code have been updated to use this
terminology as well. [GL #1944]
5708. [placeholder]
5707. [bug] Fix a bug preventing dig from qurying DoH servers

View file

@ -683,7 +683,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
CHECK(dns_zone_create(&zone, mctx));
dns_zone_settype(zone, dns_zone_master);
dns_zone_settype(zone, dns_zone_primary);
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
isc_buffer_add(&buffer, strlen(zonename));

View file

@ -47,7 +47,7 @@
static int quiet = 0;
static isc_mem_t *mctx = NULL;
dns_zone_t *zone = NULL;
dns_zonetype_t zonetype = dns_zone_master;
dns_zonetype_t zonetype = dns_zone_primary;
static int dumpzone = 0;
static const char *output_filename;
static const char *prog_name = NULL;

View file

@ -148,9 +148,9 @@ options {\n\
auth-nxdomain false;\n\
check-dup-records warn;\n\
check-mx warn;\n\
check-names master fail;\n\
check-names primary fail;\n\
check-names response ignore;\n\
check-names slave warn;\n\
check-names secondary warn;\n\
check-spf warn;\n\
clients-per-query 10;\n\
dnssec-accept-expired no;\n\
@ -280,22 +280,22 @@ view \"_bind\" chaos {\n\
};\n\
\n\
zone \"version.bind\" chaos {\n\
type master;\n\
type primary;\n\
database \"_builtin version\";\n\
};\n\
\n\
zone \"hostname.bind\" chaos {\n\
type master;\n\
type primary;\n\
database \"_builtin hostname\";\n\
};\n\
\n\
zone \"authors.bind\" chaos {\n\
type master;\n\
type primary;\n\
database \"_builtin authors\";\n\
};\n\
\n\
zone \"id.server\" chaos {\n\
type master;\n\
type primary;\n\
database \"_builtin id\";\n\
};\n\
};\n\
@ -454,10 +454,10 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
str = cfg_obj_asstring(zonetypeobj);
if (strcasecmp(str, "primary") == 0 || strcasecmp(str, "master") == 0) {
ztype = dns_zone_master;
ztype = dns_zone_primary;
} else if (strcasecmp(str, "secondary") == 0 ||
strcasecmp(str, "slave") == 0) {
ztype = dns_zone_slave;
ztype = dns_zone_secondary;
} else if (strcasecmp(str, "mirror") == 0) {
ztype = dns_zone_mirror;
} else if (strcasecmp(str, "stub") == 0) {

View file

@ -1987,7 +1987,7 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
dns_zone_setview(zone, view);
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
dns_zone_setclass(zone, view->rdclass);
dns_zone_settype(zone, dns_zone_master);
dns_zone_settype(zone, dns_zone_primary);
dns_zone_setstats(zone, named_g_server->zonestats);
dns_zone_setdbtype(zone, dns64_dbtypec, dns64_dbtype);
if (view->queryacl != NULL) {
@ -3508,8 +3508,8 @@ create_empty_zone(dns_zone_t *pzone, dns_name_t *name, dns_view_t *view,
pzone = NULL;
}
if (pzone != NULL && dns_zone_gettype(pzone) != dns_zone_master)
{
if (pzone != NULL &&
dns_zone_gettype(pzone) != dns_zone_primary) {
pzone = NULL;
}
if (pzone != NULL && dns_zone_getfile(pzone) != NULL) {
@ -3532,7 +3532,7 @@ create_empty_zone(dns_zone_t *pzone, dns_name_t *name, dns_view_t *view,
dns_zone_setdbtype(zone, empty_dbtypec, empty_dbtype);
}
dns_zone_setclass(zone, view->rdclass);
dns_zone_settype(zone, dns_zone_master);
dns_zone_settype(zone, dns_zone_primary);
dns_zone_setstats(zone, named_g_server->zonestats);
} else {
dns_zone_attach(pzone, &zone);
@ -3636,7 +3636,7 @@ create_ipv4only_zone(dns_zone_t *pzone, dns_view_t *view,
CHECK(dns_zone_setorigin(zone, name));
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
dns_zone_setclass(zone, view->rdclass);
dns_zone_settype(zone, dns_zone_master);
dns_zone_settype(zone, dns_zone_primary);
dns_zone_setstats(zone, named_g_server->zonestats);
dns_zone_setdbtype(zone, dbtypec, dbtype);
dns_zone_setdialup(zone, dns_dialuptype_no);
@ -10896,10 +10896,10 @@ named_server_retransfercommand(named_server_t *server, isc_lex_t *lex,
dns_zone_detach(&raw);
}
type = dns_zone_gettype(zone);
if (type == dns_zone_slave || type == dns_zone_mirror ||
if (type == dns_zone_secondary || type == dns_zone_mirror ||
type == dns_zone_stub ||
(type == dns_zone_redirect &&
dns_zone_getredirecttype(zone) == dns_zone_slave))
dns_zone_getredirecttype(zone) == dns_zone_secondary))
{
dns_zone_forcereload(zone);
} else {
@ -10942,8 +10942,9 @@ named_server_reloadcommand(named_server_t *server, isc_lex_t *lex,
}
} else {
type = dns_zone_gettype(zone);
if (type == dns_zone_slave || type == dns_zone_mirror ||
type == dns_zone_stub) {
if (type == dns_zone_secondary || type == dns_zone_mirror ||
type == dns_zone_stub)
{
dns_zone_refresh(zone);
dns_zone_detach(&zone);
msg = "zone refresh queued";
@ -11059,8 +11060,9 @@ named_server_refreshcommand(named_server_t *server, isc_lex_t *lex,
}
type = dns_zone_gettype(zone);
if (type == dns_zone_slave || type == dns_zone_mirror ||
type == dns_zone_stub) {
if (type == dns_zone_secondary || type == dns_zone_mirror ||
type == dns_zone_stub)
{
dns_zone_refresh(zone);
dns_zone_detach(&zone);
(void)putstr(text, msg1);
@ -12751,7 +12753,7 @@ named_server_rekey(named_server_t *server, isc_lex_t *lex,
}
type = dns_zone_gettype(zone);
if (type != dns_zone_master) {
if (type != dns_zone_primary) {
dns_zone_detach(&zone);
return (DNS_R_NOTMASTER);
}
@ -12931,7 +12933,7 @@ named_server_freeze(named_server_t *server, bool freeze, isc_lex_t *lex,
dns_zone_detach(&raw);
}
type = dns_zone_gettype(mayberaw);
if (type != dns_zone_master) {
if (type != dns_zone_primary) {
dns_zone_detach(&mayberaw);
return (DNS_R_NOTMASTER);
}
@ -14641,7 +14643,7 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex,
TCHECK(putstr(text, "zone '"));
TCHECK(putstr(text, zonename));
TCHECK(putstr(text, "' and associated files will be deleted."));
} else if (dns_zone_gettype(mayberaw) == dns_zone_slave ||
} else if (dns_zone_gettype(mayberaw) == dns_zone_secondary ||
dns_zone_gettype(mayberaw) == dns_zone_mirror ||
dns_zone_gettype(mayberaw) == dns_zone_stub)
{
@ -15558,7 +15560,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
isc_time_formathttptimestamp(&loadtime, lbuf, sizeof(lbuf));
/* Refresh/expire times */
if (zonetype == dns_zone_slave || zonetype == dns_zone_mirror ||
if (zonetype == dns_zone_secondary || zonetype == dns_zone_mirror ||
zonetype == dns_zone_stub || zonetype == dns_zone_redirect)
{
dns_zone_getexpiretime(mayberaw, &expiretime);
@ -15568,23 +15570,23 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
}
/* Key refresh time */
if (zonetype == dns_zone_master ||
(zonetype == dns_zone_slave && hasraw)) {
if (zonetype == dns_zone_primary ||
(zonetype == dns_zone_secondary && hasraw)) {
dns_zone_getrefreshkeytime(zone, &refreshkeytime);
isc_time_formathttptimestamp(&refreshkeytime, kbuf,
sizeof(kbuf));
}
/* Dynamic? */
if (zonetype == dns_zone_master) {
if (zonetype == dns_zone_primary) {
dynamic = dns_zone_isdynamic(mayberaw, true);
frozen = dynamic && !dns_zone_isdynamic(mayberaw, false);
}
/* Next resign event */
if (secure &&
(zonetype == dns_zone_master ||
(zonetype == dns_zone_slave && hasraw)) &&
(zonetype == dns_zone_primary ||
(zonetype == dns_zone_secondary && hasraw)) &&
((dns_zone_getkeyopts(zone) & DNS_ZONEKEY_NORESIGN) == 0))
{
dns_name_t *name;

View file

@ -104,8 +104,8 @@ user_zonetype(dns_zone_t *zone) {
const dns_zonetype_t type;
const char *const string;
} typemap[] = { { dns_zone_none, "none" },
{ dns_zone_master, "master" },
{ dns_zone_slave, "slave" },
{ dns_zone_primary, "primary" },
{ dns_zone_secondary, "secondary" },
{ dns_zone_mirror, "mirror" },
{ dns_zone_stub, "stub" },
{ dns_zone_staticstub, "static-stub" },
@ -1830,7 +1830,7 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR buf));
TRY0(xmlTextWriterEndElement(writer));
if (dns_zone_gettype(zone) == dns_zone_slave) {
if (dns_zone_gettype(zone) == dns_zone_secondary) {
CHECK(dns_zone_getexpiretime(zone, &timestamp));
isc_time_formatISO8601(&timestamp, buf, 64);
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "expires"));
@ -2591,7 +2591,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
isc_time_formatISO8601(&timestamp, buf, 64);
json_object_object_add(zoneobj, "loaded", json_object_new_string(buf));
if (dns_zone_gettype(zone) == dns_zone_slave) {
if (dns_zone_gettype(zone) == dns_zone_secondary) {
CHECK(dns_zone_getexpiretime(zone, &timestamp));
isc_time_formatISO8601(&timestamp, buf, 64);
json_object_object_add(zoneobj, "expires",

View file

@ -756,14 +756,14 @@ checknames(dns_zonetype_t ztype, const cfg_obj_t **maps,
isc_result_t result;
switch (ztype) {
case dns_zone_slave:
case dns_zone_secondary:
case dns_zone_mirror:
result = named_checknames_get(maps, "secondary", objp);
if (result != ISC_R_SUCCESS) {
result = named_checknames_get(maps, "slave", objp);
}
break;
case dns_zone_master:
case dns_zone_primary:
result = named_checknames_get(maps, "primary", objp);
if (result != ISC_R_SUCCESS) {
result = named_checknames_get(maps, "master", objp);
@ -968,7 +968,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
ztype = zonetype_fromconfig(zoptions);
if (raw != NULL) {
dns_zone_settype(raw, ztype);
dns_zone_settype(zone, dns_zone_master);
dns_zone_settype(zone, dns_zone_primary);
} else {
dns_zone_settype(zone, ztype);
}
@ -1029,7 +1029,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
* Unless we're using some alternative database, a master zone
* will be needing a master file.
*/
if (ztype == dns_zone_master && cpval == default_dbtype &&
if (ztype == dns_zone_primary && cpval == default_dbtype &&
filename == NULL) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
@ -1037,7 +1037,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
return (ISC_R_FAILURE);
}
if (ztype == dns_zone_slave || ztype == dns_zone_mirror) {
if (ztype == dns_zone_secondary || ztype == dns_zone_mirror) {
masterformat = dns_masterformat_raw;
} else {
masterformat = dns_masterformat_text;
@ -1142,7 +1142,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
/*
* Notify messages are processed by the raw zone if it exists.
*/
if (ztype == dns_zone_slave || ztype == dns_zone_mirror) {
if (ztype == dns_zone_secondary || ztype == dns_zone_mirror) {
RETERR(configure_zone_acl(
zconfig, vconfig, config, allow_notify, ac, mayberaw,
dns_zone_setnotifyacl, dns_zone_clearnotifyacl));
@ -1303,7 +1303,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
(notifytype == dns_notifytype_yes ||
notifytype == dns_notifytype_explicit ||
(notifytype == dns_notifytype_masteronly &&
ztype == dns_zone_master)))
ztype == dns_zone_primary)))
{
dns_ipkeylist_t ipkl;
dns_ipkeylist_init(&ipkl);
@ -1430,13 +1430,13 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
ixfrdiff = cfg_obj_asboolean(obj);
} else if ((strcasecmp(cfg_obj_asstring(obj), "primary") == 0 ||
strcasecmp(cfg_obj_asstring(obj), "master") == 0) &&
ztype == dns_zone_master)
ztype == dns_zone_primary)
{
ixfrdiff = true;
} else if ((strcasecmp(cfg_obj_asstring(obj), "secondary") ==
0 ||
strcasecmp(cfg_obj_asstring(obj), "slave") == 0) &&
ztype == dns_zone_slave)
ztype == dns_zone_secondary)
{
ixfrdiff = true;
} else {
@ -1567,7 +1567,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
* Configure update-related options. These apply to
* primary servers only.
*/
if (ztype == dns_zone_master) {
if (ztype == dns_zone_primary) {
dns_acl_t *updateacl;
RETERR(configure_zone_acl(
@ -1586,7 +1586,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
RETERR(configure_zone_ssutable(zoptions, mayberaw, zname));
}
if (ztype == dns_zone_master || raw != NULL) {
if (ztype == dns_zone_primary || raw != NULL) {
const cfg_obj_t *validity, *resign;
bool allow = false, maint = false;
bool sigvalinsecs;
@ -1727,7 +1727,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
}
}
if (ztype == dns_zone_slave || ztype == dns_zone_mirror) {
if (ztype == dns_zone_secondary || ztype == dns_zone_mirror) {
RETERR(configure_zone_acl(zconfig, vconfig, config,
allow_update_forwarding, ac, mayberaw,
dns_zone_setforwardacl,
@ -1737,7 +1737,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
/*%
* Configure parental agents, applies to primary and secondary zones.
*/
if (ztype == dns_zone_master || ztype == dns_zone_slave) {
if (ztype == dns_zone_primary || ztype == dns_zone_secondary) {
obj = NULL;
(void)cfg_map_get(zoptions, "parental-agents", &obj);
if (obj != NULL) {
@ -1759,7 +1759,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
/*%
* Primary master functionality.
*/
if (ztype == dns_zone_master) {
if (ztype == dns_zone_primary) {
obj = NULL;
result = named_config_get(maps, "check-wildcard", &obj);
if (result == ISC_R_SUCCESS) {
@ -1933,7 +1933,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
dns_acl_detach(&none);
}
/* FALLTHROUGH */
case dns_zone_slave:
case dns_zone_secondary:
case dns_zone_stub:
case dns_zone_redirect:
count = 0;

View file

@ -54,7 +54,7 @@ create_zone(sample_instance_t *const inst, dns_name_t *const name,
goto cleanup;
}
dns_zone_setclass(raw, dns_rdataclass_in);
dns_zone_settype(raw, dns_zone_master);
dns_zone_settype(raw, dns_zone_primary);
dns_zone_setdbtype(raw, 1, zone_argv);
result = dns_zonemgr_managezone(inst->zmgr, raw);

View file

@ -152,7 +152,7 @@ ret=0
echo_i "checking that zones return their type ($n)"
if $FEATURETEST --have-libxml2 && [ -x ${CURL} ] ; then
${CURL} http://10.53.0.1:${EXTRAPORT1}/xml/v3/zones > curl.out.${n} 2>/dev/null || ret=1
grep '<zone name="32/1.0.0.127-in-addr.example" rdataclass="IN"><type>master</type>' curl.out.${n} > /dev/null || ret=1
grep '<zone name="32/1.0.0.127-in-addr.example" rdataclass="IN"><type>primary</type>' curl.out.${n} > /dev/null || ret=1
else
echo_i "skipping test as libxml2 and/or curl was not found"
fi

View file

@ -109,8 +109,8 @@ Types:
typedef enum {
dns_zone_none = 0,
dns_zone_master,
dns_zone_slave,
dns_zone_primary,
dns_zone_secondary,
dns_zone_mirror,
dns_zone_stub,
dns_zone_hint,

View file

@ -109,10 +109,10 @@ main(int argc, char **argv) {
}
if (strcmp(argv[1], "master") == 0 ||
strcmp(argv[1], "primary") == 0) {
zonetype = CFG_ZONE_MASTER;
zonetype = CFG_ZONE_PRIMARY;
} else if (strcmp(argv[1], "slave") == 0 ||
strcmp(argv[1], "seconary") == 0) {
zonetype = CFG_ZONE_SLAVE;
zonetype = CFG_ZONE_SECONDARY;
} else if (strcmp(argv[1], "mirror") == 0) {
zonetype = CFG_ZONE_MIRROR;
} else if (strcmp(argv[1], "stub") == 0) {

View file

@ -2572,10 +2572,10 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
};
static optionstable dialups[] = {
{ "notify", CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
{ "notify-passive", CFG_ZONE_SLAVE },
{ "passive", CFG_ZONE_SLAVE | CFG_ZONE_STUB },
{ "refresh", CFG_ZONE_SLAVE | CFG_ZONE_STUB },
{ "notify", CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "notify-passive", CFG_ZONE_SECONDARY },
{ "passive", CFG_ZONE_SECONDARY | CFG_ZONE_STUB },
{ "refresh", CFG_ZONE_SECONDARY | CFG_ZONE_STUB },
};
znamestr = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
@ -2603,11 +2603,11 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
typestr = cfg_obj_asstring(obj);
if (strcasecmp(typestr, "master") == 0 ||
strcasecmp(typestr, "primary") == 0) {
ztype = CFG_ZONE_MASTER;
ztype = CFG_ZONE_PRIMARY;
} else if (strcasecmp(typestr, "slave") == 0 ||
strcasecmp(typestr, "secondary") == 0)
{
ztype = CFG_ZONE_SLAVE;
ztype = CFG_ZONE_SECONDARY;
} else if (strcasecmp(typestr, "mirror") == 0) {
ztype = CFG_ZONE_MIRROR;
} else if (strcasecmp(typestr, "stub") == 0) {
@ -2725,8 +2725,8 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
case CFG_ZONE_DELEGATION:
break;
case CFG_ZONE_MASTER:
case CFG_ZONE_SLAVE:
case CFG_ZONE_PRIMARY:
case CFG_ZONE_SECONDARY:
case CFG_ZONE_MIRROR:
case CFG_ZONE_HINT:
case CFG_ZONE_STUB:
@ -2876,7 +2876,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
* Master, slave, and mirror zones may have an "also-notify" field, but
* shouldn't if notify is disabled.
*/
if (ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_SLAVE ||
if (ztype == CFG_ZONE_PRIMARY || ztype == CFG_ZONE_SECONDARY ||
ztype == CFG_ZONE_MIRROR)
{
bool donotify = true;
@ -2894,7 +2894,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
donotify = cfg_obj_asboolean(obj);
} else {
const char *str = cfg_obj_asstring(obj);
if (ztype != CFG_ZONE_MASTER &&
if (ztype != CFG_ZONE_PRIMARY &&
(strcasecmp(str, "master-only") == 0 ||
strcasecmp(str, "primary-only") == 0))
{
@ -2933,7 +2933,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
* exception: when mirroring the root zone, a default, built-in master
* server list is used in the absence of one explicitly specified.
*/
if (ztype == CFG_ZONE_SLAVE || ztype == CFG_ZONE_STUB ||
if (ztype == CFG_ZONE_SECONDARY || ztype == CFG_ZONE_STUB ||
(ztype == CFG_ZONE_MIRROR && zname != NULL &&
!dns_name_equal(zname, dns_rootname)))
{
@ -2981,7 +2981,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
* Primary and secondary zones that have a "parental-agents" field,
* must have a corresponding "parental-agents" clause.
*/
if (ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_SLAVE) {
if (ztype == CFG_ZONE_PRIMARY || ztype == CFG_ZONE_SECONDARY) {
obj = NULL;
(void)cfg_map_get(zoptions, "parental-agents", &obj);
if (obj != NULL) {
@ -3020,7 +3020,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
/*
* Master zones can't have both "allow-update" and "update-policy".
*/
if (ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_SLAVE) {
if (ztype == CFG_ZONE_PRIMARY || ztype == CFG_ZONE_SECONDARY) {
bool signing = false;
isc_result_t res1, res2, res3;
const cfg_obj_t *au = NULL;
@ -3101,11 +3101,9 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
"inline-signing to be configured "
"for the zone",
arg,
(ztype == CFG_ZONE_MASTER) ? " dyna"
"mic "
"DNS "
"or"
: "");
(ztype == CFG_ZONE_PRIMARY)
? " dynamic DNS or"
: "");
result = ISC_R_FAILURE;
}
@ -3134,7 +3132,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
obj = NULL;
res1 = cfg_map_get(zoptions, "dnssec-dnskey-kskonly", &obj);
if (res1 == ISC_R_SUCCESS && ztype == CFG_ZONE_SLAVE &&
if (res1 == ISC_R_SUCCESS && ztype == CFG_ZONE_SECONDARY &&
!signing) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"dnssec-dnskey-kskonly: requires "
@ -3159,7 +3157,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
obj = NULL;
res1 = cfg_map_get(zoptions, "dnssec-loadkeys-interval", &obj);
if (res1 == ISC_R_SUCCESS && ztype == CFG_ZONE_SLAVE &&
if (res1 == ISC_R_SUCCESS && ztype == CFG_ZONE_SECONDARY &&
!signing) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"dnssec-loadkeys-interval: requires "
@ -3169,7 +3167,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
obj = NULL;
res1 = cfg_map_get(zoptions, "update-check-ksk", &obj);
if (res1 == ISC_R_SUCCESS && ztype == CFG_ZONE_SLAVE &&
if (res1 == ISC_R_SUCCESS && ztype == CFG_ZONE_SECONDARY &&
!signing) {
cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
"update-check-ksk: requires "
@ -3196,7 +3194,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
/*
* Check the excessively complicated "dialup" option.
*/
if (ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_SLAVE ||
if (ztype == CFG_ZONE_PRIMARY || ztype == CFG_ZONE_SECONDARY ||
ztype == CFG_ZONE_STUB)
{
obj = NULL;
@ -3467,8 +3465,8 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
obj = NULL;
res1 = cfg_map_get(zoptions, "inline-signing", &obj);
if ((tresult != ISC_R_SUCCESS &&
(ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_HINT ||
(ztype == CFG_ZONE_SLAVE && res1 == ISC_R_SUCCESS &&
(ztype == CFG_ZONE_PRIMARY || ztype == CFG_ZONE_HINT ||
(ztype == CFG_ZONE_SECONDARY && res1 == ISC_R_SUCCESS &&
cfg_obj_asboolean(obj)))))
{
cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR,
@ -3476,7 +3474,7 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
znamestr);
result = tresult;
} else if (tresult == ISC_R_SUCCESS &&
(ztype == CFG_ZONE_SLAVE ||
(ztype == CFG_ZONE_SECONDARY ||
ztype == CFG_ZONE_MIRROR || ddns ||
has_dnssecpolicy))
{
@ -3485,7 +3483,8 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
result = tresult;
}
} else if (tresult == ISC_R_SUCCESS &&
(ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_HINT))
(ztype == CFG_ZONE_PRIMARY ||
ztype == CFG_ZONE_HINT))
{
tresult = fileexist(fileobj, files, false, logctx);
if (tresult != ISC_R_SUCCESS) {

View file

@ -36,8 +36,8 @@
typedef enum {
dns_zone_none,
dns_zone_master,
dns_zone_slave,
dns_zone_primary,
dns_zone_secondary,
dns_zone_mirror,
dns_zone_stub,
dns_zone_staticstub,
@ -46,6 +46,14 @@ typedef enum {
dns_zone_redirect
} dns_zonetype_t;
#ifndef dns_zone_master
#define dns_zone_master dns_zone_primary
#endif /* dns_zone_master */
#ifndef dns_zone_slave
#define dns_zone_slave dns_zone_secondary
#endif /* dns_zone_slave */
typedef enum {
dns_zonestat_none = 0,
dns_zonestat_terse,
@ -1465,8 +1473,8 @@ dns_zone_getredirecttype(dns_zone_t *zone);
*\li 'zone' to be a redirect zone.
*
* Returns:
*\li 'dns_zone_master'
*\li 'dns_zone_slave'
*\li 'dns_zone_primary'
*\li 'dns_zone_secondary'
*/
void

View file

@ -245,7 +245,7 @@ dns_test_makezone(const char *name, dns_zone_t **zonep, dns_view_t *view,
/*
* Set zone type and origin.
*/
dns_zone_settype(zone, dns_zone_master);
dns_zone_settype(zone, dns_zone_primary);
origin = dns_fixedname_initname(&fixed_origin);
result = dns_name_fromstring(origin, name, 0, NULL);
if (result != ISC_R_SUCCESS) {

View file

@ -1868,7 +1868,7 @@ bool
dns_zone_isdynamic(dns_zone_t *zone, bool ignore_freeze) {
REQUIRE(DNS_ZONE_VALID(zone));
if (zone->type == dns_zone_slave || zone->type == dns_zone_mirror ||
if (zone->type == dns_zone_secondary || zone->type == dns_zone_mirror ||
zone->type == dns_zone_stub || zone->type == dns_zone_key ||
(zone->type == dns_zone_redirect && zone->masters != NULL))
{
@ -1876,12 +1876,12 @@ dns_zone_isdynamic(dns_zone_t *zone, bool ignore_freeze) {
}
/* Inline zones are always dynamic. */
if (zone->type == dns_zone_master && zone->raw != NULL) {
if (zone->type == dns_zone_primary && zone->raw != NULL) {
return (true);
}
/* If !ignore_freeze, we need check whether updates are disabled. */
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
(!zone->update_disabled || ignore_freeze) &&
((zone->ssutable != NULL) ||
(zone->update_acl != NULL && !dns_acl_isnone(zone->update_acl))))
@ -2132,7 +2132,7 @@ zone_load(dns_zone_t *zone, unsigned int flags, bool locked) {
* reloaded. Do nothing - the database we already
* have is guaranteed to be up-to-date.
*/
if (zone->type == dns_zone_master && !hasraw) {
if (zone->type == dns_zone_primary && !hasraw) {
result = DNS_R_DYNAMIC;
} else {
result = ISC_R_SUCCESS;
@ -2192,7 +2192,7 @@ zone_load(dns_zone_t *zone, unsigned int flags, bool locked) {
* Built in zones (with the exception of empty zones) don't need
* to be reloaded.
*/
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
strcmp(zone->db_argv[0], "_builtin") == 0 &&
(zone->db_argc < 2 || strcmp(zone->db_argv[1], "empty") != 0) &&
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED))
@ -2262,8 +2262,8 @@ zone_load(dns_zone_t *zone, unsigned int flags, bool locked) {
goto cleanup;
}
if ((zone->type == dns_zone_slave || zone->type == dns_zone_mirror ||
zone->type == dns_zone_stub ||
if ((zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror || zone->type == dns_zone_stub ||
(zone->type == dns_zone_redirect && zone->masters != NULL)) &&
rbt)
{
@ -2302,8 +2302,8 @@ zone_load(dns_zone_t *zone, unsigned int flags, bool locked) {
}
dns_db_settask(db, zone->task);
if (zone->type == dns_zone_master || zone->type == dns_zone_slave ||
zone->type == dns_zone_mirror)
if (zone->type == dns_zone_primary ||
zone->type == dns_zone_secondary || zone->type == dns_zone_mirror)
{
result = dns_db_setgluecachestats(db, zone->gluecachestats);
if (result == ISC_R_NOTIMPLEMENTED) {
@ -2319,7 +2319,7 @@ zone_load(dns_zone_t *zone, unsigned int flags, bool locked) {
result = zone_startload(db, zone, loadtime);
} else {
result = DNS_R_NOMASTERFILE;
if (zone->type == dns_zone_master ||
if (zone->type == dns_zone_primary ||
(zone->type == dns_zone_redirect &&
zone->masters == NULL))
{
@ -2448,7 +2448,7 @@ dns_zone_loadandthaw(dns_zone_t *zone) {
* have been made. If we do DNSSEC maintenance on this
* zone, schedule a full sign for this zone.
*/
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
DNS_ZONEKEY_OPTION(zone, DNS_ZONEKEY_MAINTAIN))
{
DNS_ZONEKEY_SETOPTION(zone, DNS_ZONEKEY_FULLSIGN);
@ -2480,7 +2480,7 @@ get_master_options(dns_zone_t *zone) {
unsigned int options;
options = DNS_MASTER_ZONE | DNS_MASTER_RESIGN;
if (zone->type == dns_zone_slave || zone->type == dns_zone_mirror ||
if (zone->type == dns_zone_secondary || zone->type == dns_zone_mirror ||
(zone->type == dns_zone_redirect && zone->masters == NULL))
{
options |= DNS_MASTER_SLAVE;
@ -2815,7 +2815,7 @@ zone_check_mx(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
return (true);
}
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
level = ISC_LOG_ERROR;
} else {
level = ISC_LOG_WARNING;
@ -2916,7 +2916,7 @@ zone_check_srv(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
return (true);
}
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
level = ISC_LOG_ERROR;
} else {
level = ISC_LOG_WARNING;
@ -3011,7 +3011,7 @@ zone_check_glue(dns_zone_t *zone, dns_db_t *db, dns_name_t *name,
return (true);
}
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
level = ISC_LOG_ERROR;
} else {
level = ISC_LOG_WARNING;
@ -3946,7 +3946,7 @@ set_resigntime(dns_zone_t *zone) {
}
if (!inline_secure(zone) &&
(zone->type != dns_zone_master ||
(zone->type != dns_zone_primary ||
(zone->ssutable == NULL &&
(zone->update_acl == NULL || dns_acl_isnone(zone->update_acl)))))
{
@ -3991,7 +3991,7 @@ check_nsec3param(dns_zone_t *zone, dns_db_t *db) {
dns_rdata_nsec3param_t nsec3param;
dns_rdataset_t rdataset;
isc_result_t result;
bool dynamic = (zone->type == dns_zone_master)
bool dynamic = (zone->type == dns_zone_primary)
? dns_zone_isdynamic(zone, false)
: false;
@ -4827,7 +4827,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
* XXX better error feedback to log.
*/
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
if (zone->type == dns_zone_slave ||
if (zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror ||
zone->type == dns_zone_stub ||
(zone->type == dns_zone_redirect && zone->masters == NULL))
@ -4844,7 +4844,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
zone->masterfile,
dns_result_totext(result));
}
} else if (zone->type == dns_zone_master &&
} else if (zone->type == dns_zone_primary &&
inline_secure(zone) && result == ISC_R_FILENOTFOUND)
{
dns_zone_logc(zone, DNS_LOGCATEGORY_ZONELOAD,
@ -4991,8 +4991,8 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
switch (zone->type) {
case dns_zone_dlz:
case dns_zone_master:
case dns_zone_slave:
case dns_zone_primary:
case dns_zone_secondary:
case dns_zone_mirror:
case dns_zone_stub:
case dns_zone_redirect:
@ -5010,7 +5010,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
if (zone->type == dns_zone_master && errors != 0) {
if (zone->type == dns_zone_primary && errors != 0) {
result = DNS_R_BADZONE;
goto cleanup;
}
@ -5021,14 +5021,14 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
goto cleanup;
}
}
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
DNS_ZONE_OPTION(zone, DNS_ZONEOPT_CHECKINTEGRITY) &&
!integrity_checks(zone, db))
{
result = DNS_R_BADZONE;
goto cleanup;
}
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
DNS_ZONE_OPTION(zone, DNS_ZONEOPT_CHECKDUPRR) &&
!zone_check_dup(zone, db))
{
@ -5036,7 +5036,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
goto cleanup;
}
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
result = dns_zone_cdscheck(zone, db, NULL);
if (result != ISC_R_SUCCESS) {
dns_zone_log(zone, ISC_LOG_ERROR,
@ -5068,7 +5068,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
{
uint32_t serialmin, serialmax;
INSIST(zone->type == dns_zone_master);
INSIST(zone->type == dns_zone_primary);
INSIST(zone->raw == NULL);
if (serial == oldserial &&
@ -5111,7 +5111,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
}
}
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
(zone->update_acl != NULL || zone->ssutable != NULL) &&
dns_zone_getsigresigninginterval(zone) < (3 * refresh) &&
dns_db_issecure(db))
@ -5131,7 +5131,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
zone->minimum = minimum;
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_HAVETIMERS);
if (zone->type == dns_zone_slave ||
if (zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror ||
zone->type == dns_zone_stub ||
(zone->type == dns_zone_redirect && zone->masters != NULL))
@ -5180,14 +5180,14 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
/*
* Check for weak DNSKEY's.
*/
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
zone_check_dnskeys(zone, db);
}
/*
* Schedule DNSSEC key refresh.
*/
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
DNS_ZONEKEY_OPTION(zone, DNS_ZONEKEY_MAINTAIN))
{
zone->refreshkeytime = now;
@ -5220,7 +5220,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
* Finished loading inline-signing zone; need to get status
* from the raw side now.
*/
if (zone->type == dns_zone_master && inline_secure(zone)) {
if (zone->type == dns_zone_primary && inline_secure(zone)) {
maybe_send_secure(zone);
}
@ -5239,14 +5239,14 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
}
if (zone->task != NULL) {
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
set_resigntime(zone);
resume_signingwithkey(zone);
resume_addnsec3chain(zone);
}
is_dynamic = dns_zone_isdynamic(zone, false);
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
!DNS_ZONEKEY_OPTION(zone, DNS_ZONEKEY_NORESIGN) &&
is_dynamic && dns_db_issecure(db))
{
@ -5338,7 +5338,7 @@ cleanup:
isc_mem_free(zone->mctx, inc->name);
isc_mem_put(zone->mctx, inc, sizeof(*inc));
}
if (zone->type == dns_zone_slave || zone->type == dns_zone_mirror ||
if (zone->type == dns_zone_secondary || zone->type == dns_zone_mirror ||
zone->type == dns_zone_stub || zone->type == dns_zone_key ||
(zone->type == dns_zone_redirect && zone->masters != NULL))
{
@ -5359,13 +5359,13 @@ cleanup:
zone_settimer(zone, &now);
}
result = ISC_R_SUCCESS;
} else if (zone->type == dns_zone_master ||
} else if (zone->type == dns_zone_primary ||
zone->type == dns_zone_redirect) {
if (!(inline_secure(zone) && result == ISC_R_FILENOTFOUND)) {
dns_zone_logc(zone, DNS_LOGCATEGORY_ZONELOAD,
ISC_LOG_ERROR,
"not loaded due to errors.");
} else if (zone->type == dns_zone_master) {
} else if (zone->type == dns_zone_primary) {
result = ISC_R_SUCCESS;
}
}
@ -5429,7 +5429,7 @@ zone_check_ns(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *version,
return (true);
}
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
level = ISC_LOG_ERROR;
} else {
level = ISC_LOG_WARNING;
@ -5516,8 +5516,8 @@ zone_count_ns_rr(dns_zone_t *zone, dns_db_t *db, dns_dbnode_t *node,
result = dns_rdataset_first(&rdataset);
while (result == ISC_R_SUCCESS) {
if (errors != NULL && zone->rdclass == dns_rdataclass_in &&
(zone->type == dns_zone_master ||
zone->type == dns_zone_slave ||
(zone->type == dns_zone_primary ||
zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror))
{
dns_rdata_init(&rdata);
@ -11282,7 +11282,7 @@ zone_maintenance(dns_zone_t *zone) {
break;
}
/* FALLTHROUGH */
case dns_zone_slave:
case dns_zone_secondary:
case dns_zone_mirror:
case dns_zone_stub:
LOCK_ZONE(zone);
@ -11307,7 +11307,7 @@ zone_maintenance(dns_zone_t *zone) {
break;
}
/* FALLTHROUGH */
case dns_zone_slave:
case dns_zone_secondary:
case dns_zone_mirror:
case dns_zone_stub:
LOCK_ZONE(zone);
@ -11327,7 +11327,7 @@ zone_maintenance(dns_zone_t *zone) {
* primaries after.
*/
LOCK_ZONE(zone);
need_notify = (zone->type == dns_zone_slave ||
need_notify = (zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror) &&
(DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY)) &&
@ -11342,8 +11342,8 @@ zone_maintenance(dns_zone_t *zone) {
* Do we need to consolidate the backing store?
*/
switch (zone->type) {
case dns_zone_master:
case dns_zone_slave:
case dns_zone_primary:
case dns_zone_secondary:
case dns_zone_mirror:
case dns_zone_key:
case dns_zone_redirect:
@ -11376,7 +11376,7 @@ zone_maintenance(dns_zone_t *zone) {
* Master/redirect zones send notifies now, if needed
*/
switch (zone->type) {
case dns_zone_master:
case dns_zone_primary:
case dns_zone_redirect:
if ((DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY)) &&
@ -11401,7 +11401,7 @@ zone_maintenance(dns_zone_t *zone) {
}
}
break;
case dns_zone_master:
case dns_zone_primary:
if (!isc_time_isepoch(&zone->refreshkeytime) &&
isc_time_compare(&now, &zone->refreshkeytime) >= 0 &&
zone->rss_event == NULL)
@ -11413,9 +11413,9 @@ zone_maintenance(dns_zone_t *zone) {
}
switch (zone->type) {
case dns_zone_master:
case dns_zone_primary:
case dns_zone_redirect:
case dns_zone_slave:
case dns_zone_secondary:
/*
* Do we need to sign/resign some RRsets?
*/
@ -11467,7 +11467,7 @@ dns_zone_markdirty(dns_zone_t *zone) {
*/
again:
LOCK_ZONE(zone);
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
if (inline_raw(zone)) {
unsigned int soacount;
secure = zone->secure;
@ -11645,7 +11645,7 @@ zone_journal_rollforward(dns_zone_t *zone, dns_db_t *db, bool *needdump,
unsigned int options;
isc_result_t result;
if (zone->type == dns_zone_master &&
if (zone->type == dns_zone_primary &&
(inline_secure(zone) ||
(zone->update_acl != NULL || zone->ssutable != NULL)))
{
@ -12777,7 +12777,7 @@ zone_notify(dns_zone_t *zone, isc_time_t *now) {
}
if (notifytype == dns_notifytype_masteronly &&
zone->type != dns_zone_master) {
zone->type != dns_zone_primary) {
return;
}
@ -13978,7 +13978,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
"master %s exceeded (source %s)",
master, source);
/* Try with slave with TCP. */
if ((zone->type == dns_zone_slave ||
if ((zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror ||
zone->type == dns_zone_redirect) &&
DNS_ZONE_OPTION(zone, DNS_ZONEOPT_TRYTCPREFRESH))
@ -14074,7 +14074,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
* Perhaps AXFR/IXFR is allowed even if SOA queries aren't.
*/
if (msg->rcode == dns_rcode_refused &&
(zone->type == dns_zone_slave ||
(zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror ||
zone->type == dns_zone_redirect))
{
@ -14087,7 +14087,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
* If truncated punt to zone transfer which will query again.
*/
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
if (zone->type == dns_zone_slave ||
if (zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror ||
zone->type == dns_zone_redirect)
{
@ -14223,7 +14223,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
dns_zone_log(zone, ISC_LOG_INFO,
"refresh: skipping %s as master %s "
"(source %s) is unreachable (cached)",
(zone->type == dns_zone_slave ||
(zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror ||
zone->type == dns_zone_redirect)
? "zone transfer"
@ -14234,7 +14234,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
tcp_transfer:
isc_event_free(&event);
dns_request_destroy(&zone->request);
if (zone->type == dns_zone_slave ||
if (zone->type == dns_zone_secondary ||
zone->type == dns_zone_mirror ||
zone->type == dns_zone_redirect)
{
@ -15083,7 +15083,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) {
}
/* FALLTHROUGH */
case dns_zone_master:
case dns_zone_primary:
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDSTARTUPNOTIFY))
{
@ -15137,7 +15137,7 @@ zone_settimer(dns_zone_t *zone, isc_time_t *now) {
}
break;
case dns_zone_slave:
case dns_zone_secondary:
case dns_zone_mirror:
treat_as_slave:
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDNOTIFY) ||
@ -15484,7 +15484,7 @@ dns_zone_notifyreceive(dns_zone_t *zone, isc_sockaddr_t *from,
/*
* If we are a master zone just succeed.
*/
if (zone->type == dns_zone_master) {
if (zone->type == dns_zone_primary) {
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
}
@ -16113,9 +16113,9 @@ dns_zonetype_name(dns_zonetype_t type) {
switch (type) {
case dns_zone_none:
return ("none");
case dns_zone_master:
case dns_zone_primary:
return ("primary");
case dns_zone_slave:
case dns_zone_secondary:
return ("secondary");
case dns_zone_mirror:
return ("mirror");
@ -16139,7 +16139,7 @@ dns_zone_getredirecttype(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(zone->type == dns_zone_redirect);
return (zone->masters == NULL ? dns_zone_master : dns_zone_slave);
return (zone->masters == NULL ? dns_zone_primary : dns_zone_secondary);
}
dns_name_t *
@ -17351,7 +17351,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
NULL);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
RUNTIME_CHECK(soacount > 0U);
if ((zone->type == dns_zone_slave ||
if ((zone->type == dns_zone_secondary ||
(zone->type == dns_zone_redirect &&
zone->masters != NULL)) &&
!isc_serial_gt(serial, oldserial))
@ -17383,7 +17383,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, bool dump) {
} else {
zone_journal_compact(zone, zone->db, serial);
}
if (zone->type == dns_zone_master && inline_raw(zone)) {
if (zone->type == dns_zone_primary && inline_raw(zone)) {
zone_send_secureserial(zone, serial);
}
} else {
@ -19729,7 +19729,7 @@ void
dns_zone_forcereload(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
if (zone->type == dns_zone_master ||
if (zone->type == dns_zone_primary ||
(zone->type == dns_zone_redirect && zone->masters == NULL))
{
return;
@ -19867,7 +19867,7 @@ dns_zone_dialup(dns_zone_t *zone) {
if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DIALNOTIFY)) {
dns_zone_notify(zone);
}
if (zone->type != dns_zone_master && zone->masters != NULL &&
if (zone->type != dns_zone_primary && zone->masters != NULL &&
DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DIALREFRESH))
{
dns_zone_refresh(zone);
@ -22053,7 +22053,7 @@ void
dns_zone_rekey(dns_zone_t *zone, bool fullsign) {
isc_time_t now;
if (zone->type == dns_zone_master && zone->task != NULL) {
if (zone->type == dns_zone_primary && zone->task != NULL) {
LOCK_ZONE(zone);
if (fullsign) {

View file

@ -418,7 +418,7 @@ freezezones(dns_zone_t *zone, void *uap) {
}
return (ISC_R_SUCCESS);
}
if (dns_zone_gettype(zone) != dns_zone_master) {
if (dns_zone_gettype(zone) != dns_zone_primary) {
if (raw != NULL) {
dns_zone_detach(&raw);
}

View file

@ -60,8 +60,8 @@
* These share space with CFG_CLAUSEFLAG values, but count
* down from the top.
*/
#define CFG_ZONE_MASTER 0x80000000
#define CFG_ZONE_SLAVE 0x40000000
#define CFG_ZONE_PRIMARY 0x80000000
#define CFG_ZONE_SECONDARY 0x40000000
#define CFG_ZONE_STUB 0x20000000
#define CFG_ZONE_HINT 0x10000000
#define CFG_ZONE_FORWARD 0x08000000

View file

@ -2184,133 +2184,134 @@ static cfg_clausedef_t dnssecpolicy_clauses[] = {
*/
static cfg_clausedef_t zone_clauses[] = {
{ "allow-notify", &cfg_type_bracketed_aml,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "allow-query", &cfg_type_bracketed_aml,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_REDIRECT | CFG_ZONE_STATICSTUB },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_REDIRECT | CFG_ZONE_STATICSTUB },
{ "allow-query-on", &cfg_type_bracketed_aml,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_REDIRECT | CFG_ZONE_STATICSTUB },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_REDIRECT | CFG_ZONE_STATICSTUB },
{ "allow-transfer", &cfg_type_bracketed_aml,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
{ "allow-update", &cfg_type_bracketed_aml, CFG_ZONE_MASTER },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "allow-update", &cfg_type_bracketed_aml, CFG_ZONE_PRIMARY },
{ "allow-update-forwarding", &cfg_type_bracketed_aml,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "also-notify", &cfg_type_namesockaddrkeylist,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "alt-transfer-source", &cfg_type_sockaddr4wild,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "alt-transfer-source-v6", &cfg_type_sockaddr6wild,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "auto-dnssec", &cfg_type_autodnssec,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
{ "check-dup-records", &cfg_type_checkmode, CFG_ZONE_MASTER },
{ "check-integrity", &cfg_type_boolean, CFG_ZONE_MASTER },
{ "check-mx", &cfg_type_checkmode, CFG_ZONE_MASTER },
{ "check-mx-cname", &cfg_type_checkmode, CFG_ZONE_MASTER },
{ "check-sibling", &cfg_type_boolean, CFG_ZONE_MASTER },
{ "check-spf", &cfg_type_warn, CFG_ZONE_MASTER },
{ "check-srv-cname", &cfg_type_checkmode, CFG_ZONE_MASTER },
{ "check-wildcard", &cfg_type_boolean, CFG_ZONE_MASTER },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "check-dup-records", &cfg_type_checkmode, CFG_ZONE_PRIMARY },
{ "check-integrity", &cfg_type_boolean, CFG_ZONE_PRIMARY },
{ "check-mx", &cfg_type_checkmode, CFG_ZONE_PRIMARY },
{ "check-mx-cname", &cfg_type_checkmode, CFG_ZONE_PRIMARY },
{ "check-sibling", &cfg_type_boolean, CFG_ZONE_PRIMARY },
{ "check-spf", &cfg_type_warn, CFG_ZONE_PRIMARY },
{ "check-srv-cname", &cfg_type_checkmode, CFG_ZONE_PRIMARY },
{ "check-wildcard", &cfg_type_boolean, CFG_ZONE_PRIMARY },
{ "dialup", &cfg_type_dialuptype,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_STUB },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_STUB },
{ "dnssec-dnskey-kskonly", &cfg_type_boolean,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "dnssec-loadkeys-interval", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "dnssec-policy", &cfg_type_astring,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
{ "dnssec-secure-to-insecure", &cfg_type_boolean, CFG_ZONE_MASTER },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "dnssec-secure-to-insecure", &cfg_type_boolean, CFG_ZONE_PRIMARY },
{ "dnssec-update-mode", &cfg_type_dnssecupdatemode,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "forward", &cfg_type_forwardtype,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_STUB |
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_STUB |
CFG_ZONE_STATICSTUB | CFG_ZONE_FORWARD },
{ "forwarders", &cfg_type_portiplist,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_STUB |
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_STUB |
CFG_ZONE_STATICSTUB | CFG_ZONE_FORWARD },
{ "key-directory", &cfg_type_qstring,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "maintain-ixfr-base", NULL, CFG_CLAUSEFLAG_ANCIENT },
{ "masterfile-format", &cfg_type_masterformat,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_REDIRECT },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_REDIRECT },
{ "masterfile-style", &cfg_type_masterstyle,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_REDIRECT },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_REDIRECT },
{ "max-ixfr-log-size", NULL, CFG_CLAUSEFLAG_ANCIENT },
{ "max-ixfr-ratio", &cfg_type_ixfrratio,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "max-journal-size", &cfg_type_size,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "max-records", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_STATICSTUB | CFG_ZONE_REDIRECT },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_STATICSTUB | CFG_ZONE_REDIRECT },
{ "max-refresh-time", &cfg_type_uint32,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "max-retry-time", &cfg_type_uint32,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "max-transfer-idle-in", &cfg_type_uint32,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "max-transfer-idle-out", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_MIRROR | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_MIRROR | CFG_ZONE_SECONDARY },
{ "max-transfer-time-in", &cfg_type_uint32,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "max-transfer-time-out", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_MIRROR | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_MIRROR | CFG_ZONE_SECONDARY },
{ "max-zone-ttl", &cfg_type_maxduration,
CFG_ZONE_MASTER | CFG_ZONE_REDIRECT },
CFG_ZONE_PRIMARY | CFG_ZONE_REDIRECT },
{ "min-refresh-time", &cfg_type_uint32,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "min-retry-time", &cfg_type_uint32,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "multi-master", &cfg_type_boolean,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "notify", &cfg_type_notifytype,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "notify-delay", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "notify-source", &cfg_type_sockaddr4wild,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "notify-source-v6", &cfg_type_sockaddr6wild,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "notify-to-soa", &cfg_type_boolean,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "nsec3-test-zone", &cfg_type_boolean,
CFG_CLAUSEFLAG_TESTONLY | CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_CLAUSEFLAG_TESTONLY | CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "parental-source", &cfg_type_sockaddr4wild,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "parental-source-v6", &cfg_type_sockaddr6wild,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "request-expire", &cfg_type_boolean,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
{ "request-ixfr", &cfg_type_boolean, CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
{ "serial-update-method", &cfg_type_updatemethod, CFG_ZONE_MASTER },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "request-ixfr", &cfg_type_boolean,
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "serial-update-method", &cfg_type_updatemethod, CFG_ZONE_PRIMARY },
{ "sig-signing-nodes", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "sig-signing-signatures", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "sig-signing-type", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "sig-validity-interval", &cfg_type_validityinterval,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "dnskey-sig-validity", &cfg_type_uint32,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "transfer-source", &cfg_type_sockaddr4wild,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "transfer-source-v6", &cfg_type_sockaddr6wild,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "try-tcp-refresh", &cfg_type_boolean,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "update-check-ksk", &cfg_type_boolean,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "use-alt-transfer-source", &cfg_type_boolean,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
{ "zero-no-soa-ttl", &cfg_type_boolean,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "zone-statistics", &cfg_type_zonestat,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_STATICSTUB | CFG_ZONE_REDIRECT },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_STATICSTUB | CFG_ZONE_REDIRECT },
{ NULL, NULL, 0 }
};
@ -2326,43 +2327,44 @@ static cfg_clausedef_t zone_only_clauses[] = {
* the zone options and the global/view options. Ugh.
*/
{ "type", &cfg_type_zonetype,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_STATICSTUB | CFG_ZONE_DELEGATION | CFG_ZONE_HINT |
CFG_ZONE_REDIRECT | CFG_ZONE_FORWARD },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_STATICSTUB | CFG_ZONE_DELEGATION |
CFG_ZONE_HINT | CFG_ZONE_REDIRECT | CFG_ZONE_FORWARD },
{ "check-names", &cfg_type_checkmode,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_HINT |
CFG_ZONE_STUB },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_HINT | CFG_ZONE_STUB },
{ "database", &cfg_type_astring,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB },
{ "delegation-only", &cfg_type_boolean,
CFG_ZONE_HINT | CFG_ZONE_STUB | CFG_ZONE_FORWARD },
{ "dlz", &cfg_type_astring,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_REDIRECT },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_REDIRECT },
{ "file", &cfg_type_qstring,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_HINT | CFG_ZONE_REDIRECT },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR |
CFG_ZONE_STUB | CFG_ZONE_HINT | CFG_ZONE_REDIRECT },
{ "in-view", &cfg_type_astring, CFG_ZONE_INVIEW },
{ "inline-signing", &cfg_type_boolean,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "ixfr-base", NULL, CFG_CLAUSEFLAG_ANCIENT },
{ "ixfr-from-differences", &cfg_type_boolean,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "ixfr-tmp-file", NULL, CFG_CLAUSEFLAG_ANCIENT },
{ "journal", &cfg_type_qstring,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE | CFG_ZONE_MIRROR },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR },
{ "masters", &cfg_type_namesockaddrkeylist,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_REDIRECT },
{ "parental-agents", &cfg_type_namesockaddrkeylist,
CFG_ZONE_MASTER | CFG_ZONE_SLAVE },
CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY },
{ "primaries", &cfg_type_namesockaddrkeylist,
CFG_ZONE_SLAVE | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB |
CFG_ZONE_REDIRECT },
{ "pubkey", NULL, CFG_CLAUSEFLAG_ANCIENT },
{ "server-addresses", &cfg_type_bracketed_netaddrlist,
CFG_ZONE_STATICSTUB },
{ "server-names", &cfg_type_namelist, CFG_ZONE_STATICSTUB },
{ "update-policy", &cfg_type_updatepolicy, CFG_ZONE_MASTER },
{ "update-policy", &cfg_type_updatepolicy, CFG_ZONE_PRIMARY },
{ NULL, NULL, 0 }
};
@ -3807,11 +3809,11 @@ cfg_print_zonegrammar(const unsigned int zonetype, unsigned int flags,
pctx.indent++;
switch (zonetype) {
case CFG_ZONE_MASTER:
case CFG_ZONE_PRIMARY:
cfg_print_indent(&pctx);
cfg_print_cstr(&pctx, "type ( master | primary );\n");
break;
case CFG_ZONE_SLAVE:
case CFG_ZONE_SECONDARY:
cfg_print_indent(&pctx);
cfg_print_cstr(&pctx, "type ( slave | secondary );\n");
break;

View file

@ -148,8 +148,8 @@ ns_notify_start(ns_client_t *client, isc_nmhandle_t *handle) {
if (result == ISC_R_SUCCESS) {
dns_zonetype_t zonetype = dns_zone_gettype(zone);
if ((zonetype == dns_zone_master) ||
(zonetype == dns_zone_slave) ||
if ((zonetype == dns_zone_primary) ||
(zonetype == dns_zone_secondary) ||
(zonetype == dns_zone_mirror) ||
(zonetype == dns_zone_stub))
{

View file

@ -7983,7 +7983,7 @@ query_getexpire(query_ctx_t *qctx) {
dns_zone_getraw(qctx->zone, &raw);
mayberaw = (raw != NULL) ? raw : qctx->zone;
if (dns_zone_gettype(mayberaw) == dns_zone_slave ||
if (dns_zone_gettype(mayberaw) == dns_zone_secondary ||
dns_zone_gettype(mayberaw) == dns_zone_mirror)
{
isc_time_t expiretime;
@ -7995,7 +7995,7 @@ query_getexpire(query_ctx_t *qctx) {
qctx->client->attributes |= NS_CLIENTATTR_HAVEEXPIRE;
qctx->client->expire = secs - qctx->client->now;
}
} else if (dns_zone_gettype(mayberaw) == dns_zone_master) {
} else if (dns_zone_gettype(mayberaw) == dns_zone_primary) {
isc_result_t result;
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdata_soa_t soa;

View file

@ -415,7 +415,7 @@ ns_test_makezone(const char *name, dns_zone_t **zonep, dns_view_t *view,
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
CHECK(dns_zone_setorigin(zone, origin));
dns_zone_setview(zone, view);
dns_zone_settype(zone, dns_zone_master);
dns_zone_settype(zone, dns_zone_primary);
dns_zone_setclass(zone, view->rdclass);
dns_view_addzone(view, zone);

View file

@ -1657,7 +1657,7 @@ ns_update_start(ns_client_t *client, isc_nmhandle_t *handle,
}
switch (dns_zone_gettype(zone)) {
case dns_zone_master:
case dns_zone_primary:
case dns_zone_dlz:
/*
* We can now fail due to a bad signature as we now know
@ -1669,7 +1669,7 @@ ns_update_start(ns_client_t *client, isc_nmhandle_t *handle,
dns_message_clonebuffer(client->message);
CHECK(send_update_event(client, zone));
break;
case dns_zone_slave:
case dns_zone_secondary:
case dns_zone_mirror:
CHECK(checkupdateacl(client, dns_zone_getforwardacl(zone),
"update forwarding", zonename, true,
@ -1685,7 +1685,7 @@ ns_update_start(ns_client_t *client, isc_nmhandle_t *handle,
failure:
if (result == DNS_R_REFUSED) {
INSIST(dns_zone_gettype(zone) == dns_zone_slave ||
INSIST(dns_zone_gettype(zone) == dns_zone_secondary ||
dns_zone_gettype(zone) == dns_zone_mirror);
inc_stats(client, zone, ns_statscounter_updaterej);
}

View file

@ -841,8 +841,8 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
/*
* Master, slave, and mirror zones are OK for transfer.
*/
case dns_zone_master:
case dns_zone_slave:
case dns_zone_primary:
case dns_zone_secondary:
case dns_zone_mirror:
case dns_zone_dlz:
break;
@ -1127,7 +1127,7 @@ have_stream:
dns_zone_getraw(zone, &raw);
mayberaw = (raw != NULL) ? raw : zone;
if ((client->attributes & NS_CLIENTATTR_WANTEXPIRE) != 0 &&
(dns_zone_gettype(mayberaw) == dns_zone_slave ||
(dns_zone_gettype(mayberaw) == dns_zone_secondary ||
dns_zone_gettype(mayberaw) == dns_zone_mirror))
{
isc_time_t expiretime;