From: Mark Andrews Date: Fri, 12 Jul 2019 04:28:03 +0000 (+1000) Subject: named-checkconf failed to report dnstap-output missing X-Git-Tag: v9.15.3~39^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=a4f38bec6af9cfbd3df235c4fadaac685e491fa0;p=thirdparty%2Fbind9.git named-checkconf failed to report dnstap-output missing from named.conf when dnstap was specified --- diff --git a/CHANGES b/CHANGES index 981812177c4..f359d7477ac 100644 --- 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 index 00000000000..822e4e6b191 --- /dev/null +++ b/bin/tests/system/dnstap/bad-missing-dnstap-output.conf @@ -0,0 +1,4 @@ +options { + dnstap { client; auth; }; + recursion yes; +}; diff --git a/lib/bind9/check.c b/lib/bind9/check.c index c984d8fd7b1..abb0692ebea 100644 --- a/lib/bind9/check.c +++ b/lib/bind9/check.c @@ -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