From 0e57fc160e7a32d4c7c94ee62bf9da6e80dcea09 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 25 Feb 2022 16:33:30 -0800 Subject: [PATCH 1/2] add a CFG_CLAUSEFLAG_NODOC flag for use with outdated terms "masters" and "default-masters" are now flagged so they will not be included in the named.conf man page, despite being accepted as valid options by the parser for backward compatibiility. --- bin/named/named.conf.rst | 48 +++++++------------------- doc/man/named.conf.5in | 52 +++++++---------------------- doc/misc/mirror.zoneopt | 1 - doc/misc/mirror.zoneopt.rst | 1 - doc/misc/options | 43 +++++++----------------- doc/misc/options.active | 43 +++++++----------------- doc/misc/options.grammar.rst | 15 ++++----- doc/misc/redirect.zoneopt | 1 - doc/misc/redirect.zoneopt.rst | 1 - doc/misc/slave.zoneopt | 1 - doc/misc/slave.zoneopt.rst | 1 - doc/misc/stub.zoneopt | 1 - doc/misc/stub.zoneopt.rst | 1 - lib/isccfg/include/isccfg/grammar.h | 7 ++-- lib/isccfg/namedconf.c | 15 ++++++--- lib/isccfg/parser.c | 8 +++-- 16 files changed, 75 insertions(+), 164 deletions(-) diff --git a/bin/named/named.conf.rst b/bin/named/named.conf.rst index d361babb55..57d603b94e 100644 --- a/bin/named/named.conf.rst +++ b/bin/named/named.conf.rst @@ -152,17 +152,6 @@ See DNSSEC-KEYS. initial-ds ) integer integer integer quoted_string; ... };, deprecated -MASTERS -^^^^^^^ - -:: - - masters string [ port integer ] [ dscp - integer ] { ( remote-servers | - ipv4_address [ port integer ] | - ipv6_address [ port integer ] ) [ key - string ] [ tls string ]; ... }; - OPTIONS ^^^^^^^ @@ -198,15 +187,12 @@ OPTIONS avoid-v6-udp-ports { portrange; ... }; bindkeys-file quoted_string; blackhole { address_match_element; ... }; - catalog-zones { zone string [ default-masters [ port integer ] - [ dscp integer ] { ( remote-servers | ipv4_address [ port - integer ] | ipv6_address [ port integer ] ) [ key - string ] [ tls string ]; ... } ] [ default-primaries [ port - integer ] [ dscp integer ] { ( remote-servers | - ipv4_address [ port integer ] | ipv6_address [ port - integer ] ) [ key string ] [ tls string ]; ... } ] [ - zone-directory quoted_string ] [ in-memory boolean ] [ - min-update-interval duration ]; ... }; + catalog-zones { zone string [ default-primaries [ port integer + ] [ dscp integer ] { ( remote-servers | ipv4_address [ + port integer ] | ipv6_address [ port integer ] ) [ key + string ] [ tls string ]; ... } ] [ zone-directory + quoted_string ] [ in-memory boolean ] [ min-update-interval + duration ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity boolean; check-mx ( fail | warn | ignore ); @@ -631,15 +617,12 @@ VIEW attach-cache string; auth-nxdomain boolean; auto-dnssec ( allow | maintain | off ); - catalog-zones { zone string [ default-masters [ port integer ] - [ dscp integer ] { ( remote-servers | ipv4_address [ port - integer ] | ipv6_address [ port integer ] ) [ key - string ] [ tls string ]; ... } ] [ default-primaries [ port - integer ] [ dscp integer ] { ( remote-servers | - ipv4_address [ port integer ] | ipv6_address [ port - integer ] ) [ key string ] [ tls string ]; ... } ] [ - zone-directory quoted_string ] [ in-memory boolean ] [ - min-update-interval duration ]; ... }; + catalog-zones { zone string [ default-primaries [ port integer + ] [ dscp integer ] { ( remote-servers | ipv4_address [ + port integer ] | ipv6_address [ port integer ] ) [ key + string ] [ tls string ]; ... } ] [ zone-directory + quoted_string ] [ in-memory boolean ] [ min-update-interval + duration ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity boolean; check-mx ( fail | warn | ignore ); @@ -946,10 +929,6 @@ VIEW key-directory quoted_string; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port integer ] [ dscp integer ] { ( - remote-servers | ipv4_address [ port integer ] | - ipv6_address [ port integer ] ) [ key string ] [ - tls string ]; ... }; max-ixfr-ratio ( unlimited | percentage ); max-journal-size ( default | unlimited | sizeval ); max-records integer; @@ -1065,9 +1044,6 @@ ZONE key-directory quoted_string; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port integer ] [ dscp integer ] { ( remote-servers - | ipv4_address [ port integer ] | ipv6_address [ port - integer ] ) [ key string ] [ tls string ]; ... }; max-ixfr-ratio ( unlimited | percentage ); max-journal-size ( default | unlimited | sizeval ); max-records integer; diff --git a/doc/man/named.conf.5in b/doc/man/named.conf.5in index dcc48ec42a..bd8ffc8eb2 100644 --- a/doc/man/named.conf.5in +++ b/doc/man/named.conf.5in @@ -203,21 +203,6 @@ managed\-keys { string ( static\-key .fi .UNINDENT .UNINDENT -.SS MASTERS -.INDENT 0.0 -.INDENT 3.5 -.sp -.nf -.ft C -masters string [ port integer ] [ dscp - integer ] { ( remote\-servers | - ipv4_address [ port integer ] | - ipv6_address [ port integer ] ) [ key - string ] [ tls string ]; ... }; -.ft P -.fi -.UNINDENT -.UNINDENT .SS OPTIONS .INDENT 0.0 .INDENT 3.5 @@ -254,15 +239,12 @@ options { avoid\-v6\-udp\-ports { portrange; ... }; bindkeys\-file quoted_string; blackhole { address_match_element; ... }; - catalog\-zones { zone string [ default\-masters [ port integer ] - [ dscp integer ] { ( remote\-servers | ipv4_address [ port - integer ] | ipv6_address [ port integer ] ) [ key - string ] [ tls string ]; ... } ] [ default\-primaries [ port - integer ] [ dscp integer ] { ( remote\-servers | - ipv4_address [ port integer ] | ipv6_address [ port - integer ] ) [ key string ] [ tls string ]; ... } ] [ - zone\-directory quoted_string ] [ in\-memory boolean ] [ - min\-update\-interval duration ]; ... }; + catalog\-zones { zone string [ default\-primaries [ port integer + ] [ dscp integer ] { ( remote\-servers | ipv4_address [ + port integer ] | ipv6_address [ port integer ] ) [ key + string ] [ tls string ]; ... } ] [ zone\-directory + quoted_string ] [ in\-memory boolean ] [ min\-update\-interval + duration ]; ... }; check\-dup\-records ( fail | warn | ignore ); check\-integrity boolean; check\-mx ( fail | warn | ignore ); @@ -723,15 +705,12 @@ view string [ class ] { attach\-cache string; auth\-nxdomain boolean; auto\-dnssec ( allow | maintain | off ); - catalog\-zones { zone string [ default\-masters [ port integer ] - [ dscp integer ] { ( remote\-servers | ipv4_address [ port - integer ] | ipv6_address [ port integer ] ) [ key - string ] [ tls string ]; ... } ] [ default\-primaries [ port - integer ] [ dscp integer ] { ( remote\-servers | - ipv4_address [ port integer ] | ipv6_address [ port - integer ] ) [ key string ] [ tls string ]; ... } ] [ - zone\-directory quoted_string ] [ in\-memory boolean ] [ - min\-update\-interval duration ]; ... }; + catalog\-zones { zone string [ default\-primaries [ port integer + ] [ dscp integer ] { ( remote\-servers | ipv4_address [ + port integer ] | ipv6_address [ port integer ] ) [ key + string ] [ tls string ]; ... } ] [ zone\-directory + quoted_string ] [ in\-memory boolean ] [ min\-update\-interval + duration ]; ... }; check\-dup\-records ( fail | warn | ignore ); check\-integrity boolean; check\-mx ( fail | warn | ignore ); @@ -1038,10 +1017,6 @@ view string [ class ] { key\-directory quoted_string; masterfile\-format ( raw | text ); masterfile\-style ( full | relative ); - masters [ port integer ] [ dscp integer ] { ( - remote\-servers | ipv4_address [ port integer ] | - ipv6_address [ port integer ] ) [ key string ] [ - tls string ]; ... }; max\-ixfr\-ratio ( unlimited | percentage ); max\-journal\-size ( default | unlimited | sizeval ); max\-records integer; @@ -1161,9 +1136,6 @@ zone string [ class ] { key\-directory quoted_string; masterfile\-format ( raw | text ); masterfile\-style ( full | relative ); - masters [ port integer ] [ dscp integer ] { ( remote\-servers - | ipv4_address [ port integer ] | ipv6_address [ port - integer ] ) [ key string ] [ tls string ]; ... }; max\-ixfr\-ratio ( unlimited | percentage ); max\-journal\-size ( default | unlimited | sizeval ); max\-records integer; diff --git a/doc/misc/mirror.zoneopt b/doc/misc/mirror.zoneopt index a21182789d..8b673c2409 100644 --- a/doc/misc/mirror.zoneopt +++ b/doc/misc/mirror.zoneopt @@ -15,7 +15,6 @@ zone [ ] { journal ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; diff --git a/doc/misc/mirror.zoneopt.rst b/doc/misc/mirror.zoneopt.rst index f747c6d9e6..6262f4b712 100644 --- a/doc/misc/mirror.zoneopt.rst +++ b/doc/misc/mirror.zoneopt.rst @@ -28,7 +28,6 @@ journal ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; diff --git a/doc/misc/options b/doc/misc/options index 3a8730c3ac..2aca017155 100644 --- a/doc/misc/options +++ b/doc/misc/options @@ -75,12 +75,6 @@ managed-keys { ( static-key initial-ds ) ; ... }; // may occur multiple times, deprecated -masters [ port ] [ dscp - ] { ( | - [ port ] | - [ port ] ) [ key - ] [ tls ]; ... }; // may occur multiple times - options { allow-new-zones ; allow-notify { ; ... }; @@ -111,15 +105,12 @@ options { avoid-v6-udp-ports { ; ... }; bindkeys-file ; blackhole { ; ... }; - catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port - ] | [ port ] ) [ key - ] [ tls ]; ... } ] [ default-primaries [ port - ] [ dscp ] { ( | - [ port ] | [ port - ] ) [ key ] [ tls ]; ... } ] [ - zone-directory ] [ in-memory ] [ - min-update-interval ]; ... }; + catalog-zones { zone [ default-primaries [ port + ] [ dscp ] { ( | [ + port ] | [ port ] ) [ key + ] [ tls ]; ... } ] [ zone-directory + ] [ in-memory ] [ min-update-interval + ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity ; check-mx ( fail | warn | ignore ); @@ -500,15 +491,12 @@ view [ ] { attach-cache ; auth-nxdomain ; auto-dnssec ( allow | maintain | off ); - catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port - ] | [ port ] ) [ key - ] [ tls ]; ... } ] [ default-primaries [ port - ] [ dscp ] { ( | - [ port ] | [ port - ] ) [ key ] [ tls ]; ... } ] [ - zone-directory ] [ in-memory ] [ - min-update-interval ]; ... }; + catalog-zones { zone [ default-primaries [ port + ] [ dscp ] { ( | [ + port ] | [ port ] ) [ key + ] [ tls ]; ... } ] [ zone-directory + ] [ in-memory ] [ min-update-interval + ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity ; check-mx ( fail | warn | ignore ); @@ -817,10 +805,6 @@ view [ ] { key-directory ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( - | [ port ] | - [ port ] ) [ key ] [ - tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; @@ -932,9 +916,6 @@ zone [ ] { key-directory ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( - | [ port ] | [ port - ] ) [ key ] [ tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; diff --git a/doc/misc/options.active b/doc/misc/options.active index 8c97c2d97c..7944b1d105 100644 --- a/doc/misc/options.active +++ b/doc/misc/options.active @@ -74,12 +74,6 @@ managed-keys { ( static-key initial-ds ) ; ... }; // may occur multiple times, deprecated -masters [ port ] [ dscp - ] { ( | - [ port ] | - [ port ] ) [ key - ] [ tls ]; ... }; // may occur multiple times - options { allow-new-zones ; allow-notify { ; ... }; @@ -110,15 +104,12 @@ options { avoid-v6-udp-ports { ; ... }; bindkeys-file ; blackhole { ; ... }; - catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port - ] | [ port ] ) [ key - ] [ tls ]; ... } ] [ default-primaries [ port - ] [ dscp ] { ( | - [ port ] | [ port - ] ) [ key ] [ tls ]; ... } ] [ - zone-directory ] [ in-memory ] [ - min-update-interval ]; ... }; + catalog-zones { zone [ default-primaries [ port + ] [ dscp ] { ( | [ + port ] | [ port ] ) [ key + ] [ tls ]; ... } ] [ zone-directory + ] [ in-memory ] [ min-update-interval + ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity ; check-mx ( fail | warn | ignore ); @@ -496,15 +487,12 @@ view [ ] { attach-cache ; auth-nxdomain ; auto-dnssec ( allow | maintain | off ); - catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port - ] | [ port ] ) [ key - ] [ tls ]; ... } ] [ default-primaries [ port - ] [ dscp ] { ( | - [ port ] | [ port - ] ) [ key ] [ tls ]; ... } ] [ - zone-directory ] [ in-memory ] [ - min-update-interval ]; ... }; + catalog-zones { zone [ default-primaries [ port + ] [ dscp ] { ( | [ + port ] | [ port ] ) [ key + ] [ tls ]; ... } ] [ zone-directory + ] [ in-memory ] [ min-update-interval + ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity ; check-mx ( fail | warn | ignore ); @@ -811,10 +799,6 @@ view [ ] { key-directory ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( - | [ port ] | - [ port ] ) [ key ] [ - tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; @@ -925,9 +909,6 @@ zone [ ] { key-directory ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( - | [ port ] | [ port - ] ) [ key ] [ tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; diff --git a/doc/misc/options.grammar.rst b/doc/misc/options.grammar.rst index c03505f2e9..1ce0353b32 100644 --- a/doc/misc/options.grammar.rst +++ b/doc/misc/options.grammar.rst @@ -41,15 +41,12 @@ avoid-v6-udp-ports { ; ... }; bindkeys-file ; blackhole { ; ... }; - catalog-zones { zone [ default-masters [ port ] - [ dscp ] { ( | [ port - ] | [ port ] ) [ key - ] [ tls ]; ... } ] [ default-primaries [ port - ] [ dscp ] { ( | - [ port ] | [ port - ] ) [ key ] [ tls ]; ... } ] [ - zone-directory ] [ in-memory ] [ - min-update-interval ]; ... }; + catalog-zones { zone [ default-primaries [ port + ] [ dscp ] { ( | [ + port ] | [ port ] ) [ key + ] [ tls ]; ... } ] [ zone-directory + ] [ in-memory ] [ min-update-interval + ]; ... }; check-dup-records ( fail | warn | ignore ); check-integrity ; check-mx ( fail | warn | ignore ); diff --git a/doc/misc/redirect.zoneopt b/doc/misc/redirect.zoneopt index d79b44a4aa..1c34bb11f1 100644 --- a/doc/misc/redirect.zoneopt +++ b/doc/misc/redirect.zoneopt @@ -6,7 +6,6 @@ zone [ ] { file ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-records ; max-zone-ttl ( unlimited | ); primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; diff --git a/doc/misc/redirect.zoneopt.rst b/doc/misc/redirect.zoneopt.rst index a7df8ff771..53e9883e76 100644 --- a/doc/misc/redirect.zoneopt.rst +++ b/doc/misc/redirect.zoneopt.rst @@ -19,7 +19,6 @@ file ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-records ; max-zone-ttl ( unlimited | ); primaries [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; diff --git a/doc/misc/slave.zoneopt b/doc/misc/slave.zoneopt index 5fbbc065bc..595e94b548 100644 --- a/doc/misc/slave.zoneopt +++ b/doc/misc/slave.zoneopt @@ -27,7 +27,6 @@ zone [ ] { key-directory ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; diff --git a/doc/misc/slave.zoneopt.rst b/doc/misc/slave.zoneopt.rst index 2cef150a0f..5e0e84b7c3 100644 --- a/doc/misc/slave.zoneopt.rst +++ b/doc/misc/slave.zoneopt.rst @@ -40,7 +40,6 @@ key-directory ; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-ixfr-ratio ( unlimited | ); max-journal-size ( default | unlimited | ); max-records ; diff --git a/doc/misc/stub.zoneopt b/doc/misc/stub.zoneopt index b1b9850c3d..305585b9e0 100644 --- a/doc/misc/stub.zoneopt +++ b/doc/misc/stub.zoneopt @@ -11,7 +11,6 @@ zone [ ] { forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-records ; max-refresh-time ; max-retry-time ; diff --git a/doc/misc/stub.zoneopt.rst b/doc/misc/stub.zoneopt.rst index d7eb4d41e4..d18720b12a 100644 --- a/doc/misc/stub.zoneopt.rst +++ b/doc/misc/stub.zoneopt.rst @@ -24,7 +24,6 @@ forwarders [ port ] [ dscp ] { ( | ) [ port ] [ dscp ]; ... }; masterfile-format ( raw | text ); masterfile-style ( full | relative ); - masters [ port ] [ dscp ] { ( | [ port ] | [ port ] ) [ key ] [ tls ]; ... }; max-records ; max-refresh-time ; max-retry-time ; diff --git a/lib/isccfg/include/isccfg/grammar.h b/lib/isccfg/include/isccfg/grammar.h index 8609cd9aa5..660f812869 100644 --- a/lib/isccfg/include/isccfg/grammar.h +++ b/lib/isccfg/include/isccfg/grammar.h @@ -44,13 +44,14 @@ * "directory" option. */ #define CFG_CLAUSEFLAG_CALLBACK 0x00000020 -/*% A option that is only used in testing. */ +/*% An option that is only used in testing. */ #define CFG_CLAUSEFLAG_TESTONLY 0x00000040 /*% A configuration option that was not configured at compile time. */ #define CFG_CLAUSEFLAG_NOTCONFIGURED 0x00000080 -/*% A option for a experimental feature. */ +/*% An option for an experimental feature. */ #define CFG_CLAUSEFLAG_EXPERIMENTAL 0x00000100 -/* obsolete: #define CFG_CLAUSEFLAG_NOOP 0x00000200 */ +/*% An option that should be omited from the documentation */ +#define CFG_CLAUSEFLAG_NODOC 0x00000200 /*% Clause will be obsolete in a future release (logs a warning) */ #define CFG_CLAUSEFLAG_DEPRECATED 0x00000400 /*% Clause has been obsolete so long that it's now a fatal error */ diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 83cc600376..5fa822c05f 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -1157,7 +1157,8 @@ static cfg_clausedef_t namedconf_clauses[] = { #endif { "logging", &cfg_type_logging, 0 }, { "lwres", NULL, CFG_CLAUSEFLAG_MULTI | CFG_CLAUSEFLAG_ANCIENT }, - { "masters", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI }, + { "masters", &cfg_type_remoteservers, + CFG_CLAUSEFLAG_MULTI | CFG_CLAUSEFLAG_NODOC }, { "options", &cfg_type_options, 0 }, { "parental-agents", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI }, { "primaries", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI }, @@ -1777,6 +1778,9 @@ cfg_doc_kv_tuple(cfg_printer_t *pctx, const cfg_type_t *type) { fields = type->of; for (f = fields; f->name != NULL; f++) { + if ((f->flags & CFG_CLAUSEFLAG_NODOC) != 0) { + continue; + } if (f != fields) { cfg_print_cstr(pctx, " [ "); cfg_print_cstr(pctx, f->name); @@ -1878,7 +1882,8 @@ static cfg_type_t cfg_type_catz_zone = { "zone", parse_keyvalue, static cfg_tuplefielddef_t catz_zone_fields[] = { { "zone name", &cfg_type_catz_zone, 0 }, - { "default-masters", &cfg_type_namesockaddrkeylist, 0 }, + { "default-masters", &cfg_type_namesockaddrkeylist, + CFG_CLAUSEFLAG_NODOC }, { "default-primaries", &cfg_type_namesockaddrkeylist, 0 }, { "zone-directory", &cfg_type_qstring, 0 }, { "in-memory", &cfg_type_boolean, 0 }, @@ -2389,7 +2394,7 @@ static cfg_clausedef_t zone_only_clauses[] = { CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR }, { "masters", &cfg_type_namesockaddrkeylist, CFG_ZONE_SECONDARY | CFG_ZONE_MIRROR | CFG_ZONE_STUB | - CFG_ZONE_REDIRECT }, + CFG_ZONE_REDIRECT | CFG_CLAUSEFLAG_NODOC }, { "parental-agents", &cfg_type_namesockaddrkeylist, CFG_ZONE_PRIMARY | CFG_ZONE_SECONDARY }, { "primaries", &cfg_type_namesockaddrkeylist, @@ -3899,7 +3904,9 @@ cfg_print_zonegrammar(const unsigned int zonetype, unsigned int flags, { continue; } - if ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0) { + if ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0 || + (clause->flags & CFG_CLAUSEFLAG_NODOC) != 0) + { continue; } diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index 15018c9c15..1b4e164725 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -2731,7 +2731,9 @@ cfg_doc_mapbody(cfg_printer_t *pctx, const cfg_type_t *type) { { continue; } - if ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0) { + if ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0 || + (clause->flags & CFG_CLAUSEFLAG_NODOC) != 0) + { continue; } cfg_print_cstr(pctx, clause->name); @@ -2787,7 +2789,9 @@ cfg_doc_map(cfg_printer_t *pctx, const cfg_type_t *type) { { continue; } - if ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0) { + if ((clause->flags & CFG_CLAUSEFLAG_ANCIENT) != 0 || + (clause->flags & CFG_CLAUSEFLAG_NODOC) != 0) + { continue; } cfg_print_indent(pctx); From 0bde07261b918c342319eb9e588ca10db4483506 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 23 Feb 2022 17:18:38 -0800 Subject: [PATCH 2/2] remove old zone type documentation we now document zone type as either "primary" or "secondary", omitting the old terms (though they are still accepted). --- doc/arm/Makefile.am | 4 ++-- doc/arm/reference.rst | 4 ++-- doc/misc/Makefile.am | 24 +++++++++---------- doc/misc/{master.zoneopt => primary.zoneopt} | 2 +- ...master.zoneopt.rst => primary.zoneopt.rst} | 2 +- doc/misc/{slave.zoneopt => secondary.zoneopt} | 2 +- ...lave.zoneopt.rst => secondary.zoneopt.rst} | 2 +- lib/isccfg/namedconf.c | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) rename doc/misc/{master.zoneopt => primary.zoneopt} (99%) rename doc/misc/{master.zoneopt.rst => primary.zoneopt.rst} (99%) rename doc/misc/{slave.zoneopt => secondary.zoneopt} (99%) rename doc/misc/{slave.zoneopt.rst => secondary.zoneopt.rst} (99%) diff --git a/doc/arm/Makefile.am b/doc/arm/Makefile.am index 75d7e7434c..9db674b8d6 100644 --- a/doc/arm/Makefile.am +++ b/doc/arm/Makefile.am @@ -37,14 +37,14 @@ EXTRA_DIST = \ ../misc/key.grammar.rst \ ../misc/logging.grammar.rst \ ../misc/managed-keys.grammar.rst \ - ../misc/master.zoneopt.rst \ + ../misc/primary.zoneopt.rst \ ../misc/mirror.zoneopt.rst \ ../misc/options.grammar.rst \ ../misc/parental-agents.grammar.rst \ ../misc/primaries.grammar.rst \ ../misc/redirect.zoneopt.rst \ ../misc/server.grammar.rst \ - ../misc/slave.zoneopt.rst \ + ../misc/secondary.zoneopt.rst \ ../misc/static-stub.zoneopt.rst \ ../misc/statistics-channels.grammar.rst \ ../misc/stub.zoneopt.rst \ diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index b9d1145e54..b6aadb86ce 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -5454,8 +5454,8 @@ Here is an example of a typical split DNS setup implemented using ``zone`` Statement Grammar ~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. include:: ../misc/master.zoneopt.rst -.. include:: ../misc/slave.zoneopt.rst +.. include:: ../misc/primary.zoneopt.rst +.. include:: ../misc/secondary.zoneopt.rst .. include:: ../misc/mirror.zoneopt.rst .. include:: ../misc/hint.zoneopt.rst .. include:: ../misc/stub.zoneopt.rst diff --git a/doc/misc/Makefile.am b/doc/misc/Makefile.am index 3aab4c8b3e..a2fa397d1b 100644 --- a/doc/misc/Makefile.am +++ b/doc/misc/Makefile.am @@ -4,8 +4,8 @@ include $(top_srcdir)/Makefile.docs OPTIONS_FILES = \ options \ options.active \ - master.zoneopt \ - slave.zoneopt \ + primary.zoneopt \ + secondary.zoneopt \ mirror.zoneopt \ forward.zoneopt \ hint.zoneopt \ @@ -15,8 +15,8 @@ OPTIONS_FILES = \ delegation-only.zoneopt \ in-view.zoneopt \ ../../bin/named/named.conf.rst \ - master.zoneopt.rst \ - slave.zoneopt.rst \ + primary.zoneopt.rst \ + secondary.zoneopt.rst \ mirror.zoneopt.rst \ forward.zoneopt.rst \ hint.zoneopt.rst \ @@ -75,11 +75,11 @@ options: cfg_test options.active: cfg_test $(AM_V_CFG_TEST)$(builddir)/cfg_test --named --grammar --active | $(PERL) $(srcdir)/sort-options.pl | $(PERL) $(srcdir)/format-options.pl --strip-not-configured > $@ -master.zoneopt: cfg_test - $(AM_V_CFG_TEST)$(builddir)/cfg_test --zonegrammar master --active > $@ +primary.zoneopt: cfg_test + $(AM_V_CFG_TEST)$(builddir)/cfg_test --zonegrammar primary --active > $@ -slave.zoneopt: cfg_test - $(AM_V_CFG_TEST)$(builddir)/cfg_test --zonegrammar slave --active > $@ +secondary.zoneopt: cfg_test + $(AM_V_CFG_TEST)$(builddir)/cfg_test --zonegrammar secondary --active > $@ mirror.zoneopt: cfg_test $(AM_V_CFG_TEST)$(builddir)/cfg_test --zonegrammar mirror --active > $@ @@ -108,11 +108,11 @@ in-view.zoneopt: cfg_test ../../bin/named/named.conf.rst: options.active rst-options.pl $(AM_V_RST_OPTIONS)$(PERL) $(srcdir)/rst-options.pl options.active > $@ -master.zoneopt.rst: master.zoneopt rst-zoneopt.pl - $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl master.zoneopt > $@ +primary.zoneopt.rst: primary.zoneopt rst-zoneopt.pl + $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl primary.zoneopt > $@ -slave.zoneopt.rst: slave.zoneopt rst-zoneopt.pl - $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl slave.zoneopt > $@ +secondary.zoneopt.rst: secondary.zoneopt rst-zoneopt.pl + $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl secondary.zoneopt > $@ mirror.zoneopt.rst: mirror.zoneopt rst-zoneopt.pl $(AM_V_RST_ZONEOPT)$(PERL) $(srcdir)/rst-zoneopt.pl mirror.zoneopt > $@ diff --git a/doc/misc/master.zoneopt b/doc/misc/primary.zoneopt similarity index 99% rename from doc/misc/master.zoneopt rename to doc/misc/primary.zoneopt index 69134fd1f4..8811d2023e 100644 --- a/doc/misc/master.zoneopt +++ b/doc/misc/primary.zoneopt @@ -1,5 +1,5 @@ zone [ ] { - type ( master | primary ); + type primary; allow-query { ; ... }; allow-query-on { ; ... }; allow-transfer [ port ] [ transport ] { ; ... }; diff --git a/doc/misc/master.zoneopt.rst b/doc/misc/primary.zoneopt.rst similarity index 99% rename from doc/misc/master.zoneopt.rst rename to doc/misc/primary.zoneopt.rst index e4d01d68c7..b03d60b905 100644 --- a/doc/misc/master.zoneopt.rst +++ b/doc/misc/primary.zoneopt.rst @@ -12,7 +12,7 @@ :: zone [ ] { - type ( master | primary ); + type primary; allow-query { ; ... }; allow-query-on { ; ... }; allow-transfer [ port ] [ transport ] { ; ... }; diff --git a/doc/misc/slave.zoneopt b/doc/misc/secondary.zoneopt similarity index 99% rename from doc/misc/slave.zoneopt rename to doc/misc/secondary.zoneopt index 595e94b548..22c3a8d19d 100644 --- a/doc/misc/slave.zoneopt +++ b/doc/misc/secondary.zoneopt @@ -1,5 +1,5 @@ zone [ ] { - type ( slave | secondary ); + type secondary; allow-notify { ; ... }; allow-query { ; ... }; allow-query-on { ; ... }; diff --git a/doc/misc/slave.zoneopt.rst b/doc/misc/secondary.zoneopt.rst similarity index 99% rename from doc/misc/slave.zoneopt.rst rename to doc/misc/secondary.zoneopt.rst index 5e0e84b7c3..538f191171 100644 --- a/doc/misc/slave.zoneopt.rst +++ b/doc/misc/secondary.zoneopt.rst @@ -12,7 +12,7 @@ :: zone [ ] { - type ( slave | secondary ); + type secondary; allow-notify { ; ... }; allow-query { ; ... }; allow-query-on { ; ... }; diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 5fa822c05f..4f4ded6010 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -3855,11 +3855,11 @@ cfg_print_zonegrammar(const unsigned int zonetype, unsigned int flags, switch (zonetype) { case CFG_ZONE_PRIMARY: cfg_print_indent(&pctx); - cfg_print_cstr(&pctx, "type ( master | primary );\n"); + cfg_print_cstr(&pctx, "type primary;\n"); break; case CFG_ZONE_SECONDARY: cfg_print_indent(&pctx); - cfg_print_cstr(&pctx, "type ( slave | secondary );\n"); + cfg_print_cstr(&pctx, "type secondary;\n"); break; case CFG_ZONE_MIRROR: cfg_print_indent(&pctx);