2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

change CFG_ZONE_MASTER and CFG_ZONE_SLAVE

these values have been renamed as CFG_ZONE_PRIMARY and
CFG_ZONE_SECONDARY.
This commit is contained in:
Evan Hunt
2021-08-25 22:31:18 -07:00
parent 916760ae46
commit 679f1c0dad
4 changed files with 120 additions and 119 deletions

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

@@ -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;