From 87be8fea0db6b2e48c980f416cda3fa297c37b6f Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 25 Feb 2022 16:33:30 -0800 Subject: [PATCH] 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. (cherry picked from commit 0e57fc160e7a32d4c7c94ee62bf9da6e80dcea09) --- 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 def862f844..3c64383ba5 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 ); @@ -632,15 +618,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 ); @@ -947,10 +930,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; @@ -1066,9 +1045,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 246c396aa3..0c9bfbba1f 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 ); @@ -724,15 +706,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 ); @@ -1039,10 +1018,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; @@ -1162,9 +1137,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 b62967ef0c..d143e86d57 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 a3e2fbe3f0..24da22baf1 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 ); @@ -497,15 +488,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 ); @@ -812,10 +800,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 ; @@ -926,9 +910,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 b6dc89ca0c..fa861b8806 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 f88b1466dd..24fc007c72 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 }, @@ -1776,6 +1777,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); @@ -1877,7 +1881,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 }, @@ -2388,7 +2393,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, @@ -3898,7 +3903,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);