]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
named-checkconf failed to report dnstap-output missing
authorMark Andrews <marka@isc.org>
Fri, 12 Jul 2019 04:28:03 +0000 (14:28 +1000)
committerMark Andrews <marka@isc.org>
Tue, 23 Jul 2019 11:09:34 +0000 (21:09 +1000)
from named.conf when dnstap was specified

(cherry picked from commit a4f38bec6af9cfbd3df235c4fadaac685e491fa0)

CHANGES
bin/tests/system/dnstap/bad-missing-dnstap-output.conf [new file with mode: 0644]
lib/bind9/check.c

diff --git a/CHANGES b/CHANGES
index e02db9174cfebc26499742f730e49eba490f87e7..764ffa6ea0b2e559de77d2bca24593f7060e3a03 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+5266.  [bug]           named-checkconf failed to report dnstap-output
+                       missing from named.conf when dnstap was specified.
+                       [GL #1136]
+
 5265.  [bug]           DNS64 and RPZ nodata (CNAME *.) rules interacted badly
                        [GL #1106]
 
diff --git a/bin/tests/system/dnstap/bad-missing-dnstap-output.conf b/bin/tests/system/dnstap/bad-missing-dnstap-output.conf
new file mode 100644 (file)
index 0000000..822e4e6
--- /dev/null
@@ -0,0 +1,4 @@
+options {
+       dnstap { client; auth; };
+       recursion yes;
+};
index df3cbf1c02e285d3bcea995eaaca011c4a6cd30f..f06e22d003db78909d2f7910ca797fd82b80ef1c 100644 (file)
@@ -1478,6 +1478,16 @@ check_options(const cfg_obj_t *options, isc_log_t *logctx, isc_mem_t *mctx,
                                        result = ISC_R_FAILURE;
                        }
                }
+       } else {
+               (void) cfg_map_get(options, "dnstap", &obj);
+               if (obj != NULL) {
+                       cfg_obj_log(obj, logctx, ISC_LOG_ERROR,
+                                   "'dnstap-output' must be set if 'dnstap' "
+                                   "is set");
+                       if (result == ISC_R_SUCCESS) {
+                               result = ISC_R_FAILURE;
+                       }
+               }
        }
 #endif