diff --git a/CHANGES b/CHANGES index 796faffafb..15c0c4fada 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4523. [doc] Expand config doc for and + . [RT #43768] + 4522. [bug] Handle big gaps in log file version numbers better. [RT #38688] diff --git a/doc/misc/options b/doc/misc/options index 9e66c7550e..37683a7977 100644 --- a/doc/misc/options +++ b/doc/misc/options @@ -260,8 +260,12 @@ options { preferred-glue ; prefetch [ ]; provide-ixfr ; - query-source ; - query-source-v6 ; + query-source ( ( [ address ] ( | * ) [ port ( + | * ) ] ) | ( [ [ address ] ( | * ) ] + port ( | * ) ) ) [ dscp ]; + query-source-v6 ( ( [ address ] ( | * ) [ port ( + | * ) ] ) | ( [ [ address ] ( | * ) ] + port ( | * ) ) ) [ dscp ]; querylog ; queryport-pool-ports ; // obsolete queryport-pool-updateinterval ; // obsolete @@ -370,8 +374,12 @@ server { notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; provide-ixfr ; - query-source ; - query-source-v6 ; + query-source ( ( [ address ] ( | * ) [ port ( + | * ) ] ) | ( [ [ address ] ( | * ) ] + port ( | * ) ) ) [ dscp ]; + query-source-v6 ( ( [ address ] ( | * ) [ port ( + | * ) ] ) | ( [ [ address ] ( | * ) ] + port ( | * ) ) ) [ dscp ]; request-expire ; request-ixfr ; request-nsid ; @@ -557,8 +565,12 @@ view [ ] { preferred-glue ; prefetch [ ]; provide-ixfr ; - query-source ; - query-source-v6 ; + query-source ( ( [ address ] ( | * ) [ port ( + | * ) ] ) | ( [ [ address ] ( | * ) ] + port ( | * ) ) ) [ dscp ]; + query-source-v6 ( ( [ address ] ( | * ) [ port ( + | * ) ] ) | ( [ [ address ] ( | * ) ] + port ( | * ) ) ) [ dscp ]; queryport-pool-ports ; // obsolete queryport-pool-updateinterval ; // obsolete rate-limit { @@ -610,8 +622,14 @@ view [ ] { notify-source-v6 ( | * ) [ port ( | * ) ] [ dscp ]; provide-ixfr ; - query-source ; - query-source-v6 ; + query-source ( ( [ address ] ( | * ) [ port + ( | * ) ] ) | ( [ [ address ] ( + | * ) ] port ( | * ) ) ) [ + dscp ]; + query-source-v6 ( ( [ address ] ( | * ) [ + port ( | * ) ] ) | ( [ [ address ] ( + | * ) ] port ( | * ) ) ) [ + dscp ]; request-expire ; request-ixfr ; request-nsid ; diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index 1b3d8a9900..1488e83203 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -2973,18 +2973,41 @@ print_querysource(cfg_printer_t *pctx, const cfg_obj_t *obj) { } } +static void +doc_querysource(cfg_printer_t *pctx, const cfg_type_t *type) { + const unsigned int *flagp = type->of; + + cfg_print_cstr(pctx, "( ( [ address ] ( "); + if (*flagp & CFG_ADDR_V4OK) + cfg_print_cstr(pctx, ""); + else if (*flagp & CFG_ADDR_V6OK) + cfg_print_cstr(pctx, ""); + else + INSIST(0); + cfg_print_cstr(pctx, " | * ) [ port ( | * ) ] ) | " + "( [ [ address ] ( "); + if (*flagp & CFG_ADDR_V4OK) + cfg_print_cstr(pctx, ""); + else if (*flagp & CFG_ADDR_V6OK) + cfg_print_cstr(pctx, ""); + else + INSIST(0); + cfg_print_cstr(pctx, " | * ) ] port ( | * ) ) )" + " [ dscp ]"); +} + static unsigned int sockaddr4wild_flags = CFG_ADDR_WILDOK | CFG_ADDR_V4OK | CFG_ADDR_DSCPOK; static unsigned int sockaddr6wild_flags = CFG_ADDR_WILDOK | CFG_ADDR_V6OK | CFG_ADDR_DSCPOK; static cfg_type_t cfg_type_querysource4 = { - "querysource4", parse_querysource, NULL, cfg_doc_terminal, + "querysource4", parse_querysource, NULL, doc_querysource, NULL, &sockaddr4wild_flags }; static cfg_type_t cfg_type_querysource6 = { - "querysource6", parse_querysource, NULL, cfg_doc_terminal, + "querysource6", parse_querysource, NULL, doc_querysource, NULL, &sockaddr6wild_flags };