]> 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>
Mon, 22 Jul 2019 19:09:01 +0000 (05:09 +1000)
from named.conf when dnstap was specified

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 981812177c4845190480a45dc93f5892d40e5839..f359d7477ac8a2700ed6fff5e4356de3d1f7de55 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 c984d8fd7b145d530d6d17cbc92444afde66e11e..abb0692ebeaf83681d532c7daa3f4651ef2e8b58 100644 (file)
@@ -1459,6 +1459,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