]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add doc function for cfg_type_querysource4 and cfg_type_querysource6 (#43768)
authorMukund Sivaraman <muks@isc.org>
Fri, 2 Dec 2016 05:46:08 +0000 (11:16 +0530)
committerMukund Sivaraman <muks@isc.org>
Fri, 2 Dec 2016 05:46:08 +0000 (11:16 +0530)
CHANGES
doc/misc/options
lib/isccfg/namedconf.c

diff --git a/CHANGES b/CHANGES
index 6b31eb6d3e5249492e6b79a31461a0c74d20ce10..efad01c2bdc554a26edef85fa06da7b73455e364 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4523.  [doc]           Expand config doc for <querysource4> and
+                       <querysource6>. [RT #43768]
+
 4522.  [bug]           Handle big gaps in log file version numbers better.
                        [RT #38688]
 
index 5913b52b467c709c3d72c931e1268d212333d86b..df98a8394e883207af13e144242eda1c451cb33d 100644 (file)
@@ -260,8 +260,12 @@ options {
         preferred-glue <string>;
         prefetch <integer> [ <integer> ];
         provide-ixfr <boolean>;
-        query-source <querysource4>;
-        query-source-v6 <querysource6>;
+        query-source ( ( [ address ] ( <ipv4_address> | * ) [ port (
+            <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ]
+            port ( <integer> | * ) ) ) [ dscp <integer> ];
+        query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port (
+            <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ]
+            port ( <integer> | * ) ) ) [ dscp <integer> ];
         querylog <boolean>;
         queryport-pool-ports <integer>; // obsolete
         queryport-pool-updateinterval <integer>; // obsolete
@@ -370,8 +374,12 @@ server <netprefix> {
         notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ]
             [ dscp <integer> ];
         provide-ixfr <boolean>;
-        query-source <querysource4>;
-        query-source-v6 <querysource6>;
+        query-source ( ( [ address ] ( <ipv4_address> | * ) [ port (
+            <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ]
+            port ( <integer> | * ) ) ) [ dscp <integer> ];
+        query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port (
+            <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ]
+            port ( <integer> | * ) ) ) [ dscp <integer> ];
         request-expire <boolean>;
         request-ixfr <boolean>;
         request-nsid <boolean>;
@@ -557,8 +565,12 @@ view <string> [ <class> ] {
         preferred-glue <string>;
         prefetch <integer> [ <integer> ];
         provide-ixfr <boolean>;
-        query-source <querysource4>;
-        query-source-v6 <querysource6>;
+        query-source ( ( [ address ] ( <ipv4_address> | * ) [ port (
+            <integer> | * ) ] ) | ( [ [ address ] ( <ipv4_address> | * ) ]
+            port ( <integer> | * ) ) ) [ dscp <integer> ];
+        query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [ port (
+            <integer> | * ) ] ) | ( [ [ address ] ( <ipv6_address> | * ) ]
+            port ( <integer> | * ) ) ) [ dscp <integer> ];
         queryport-pool-ports <integer>; // obsolete
         queryport-pool-updateinterval <integer>; // obsolete
         rate-limit {
@@ -610,8 +622,14 @@ view <string> [ <class> ] {
                 notify-source-v6 ( <ipv6_address> | * ) [ port ( <integer>
                     | * ) ] [ dscp <integer> ];
                 provide-ixfr <boolean>;
-                query-source <querysource4>;
-                query-source-v6 <querysource6>;
+                query-source ( ( [ address ] ( <ipv4_address> | * ) [ port
+                    ( <integer> | * ) ] ) | ( [ [ address ] (
+                    <ipv4_address> | * ) ] port ( <integer> | * ) ) ) [
+                    dscp <integer> ];
+                query-source-v6 ( ( [ address ] ( <ipv6_address> | * ) [
+                    port ( <integer> | * ) ] ) | ( [ [ address ] (
+                    <ipv6_address> | * ) ] port ( <integer> | * ) ) ) [
+                    dscp <integer> ];
                 request-expire <boolean>;
                 request-ixfr <boolean>;
                 request-nsid <boolean>;
index 9f6d1a517082feff3a6de6abff6bb8f728661303..795b0db9612185c15068dd481ca8315a132d04e4 100644 (file)
@@ -2989,18 +2989,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, "<ipv4_address>");
+       else if (*flagp & CFG_ADDR_V6OK)
+               cfg_print_cstr(pctx, "<ipv6_address>");
+       else
+               INSIST(0);
+       cfg_print_cstr(pctx, " | * ) [ port ( <integer> | * ) ] ) | "
+                      "( [ [ address ] ( ");
+       if (*flagp & CFG_ADDR_V4OK)
+               cfg_print_cstr(pctx, "<ipv4_address>");
+       else if (*flagp & CFG_ADDR_V6OK)
+               cfg_print_cstr(pctx, "<ipv6_address>");
+       else
+               INSIST(0);
+       cfg_print_cstr(pctx, " | * ) ] port ( <integer> | * ) ) )"
+                      " [ dscp <integer> ]");
+}
+
 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
 };