]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix named-checkconf and statistics-channels
authorMark Andrews <marka@isc.org>
Mon, 2 Sep 2024 05:53:11 +0000 (15:53 +1000)
committerMark Andrews <marka@isc.org>
Wed, 11 Sep 2024 23:21:44 +0000 (09:21 +1000)
If neither libxml2 nor libjson_c are available have named-checkconf
fail if a statistics-channels block is specified.

lib/isccfg/namedconf.c

index 09275a830a60bae7ea846a8b216c44e82a27bab1..9adaec5eef045f0ffa6db44e92f28ce20bb79cd0 100644 (file)
@@ -1259,8 +1259,13 @@ static cfg_clausedef_t namedconf_clauses[] = {
        { "options", &cfg_type_options, 0 },
        { "parental-agents", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI },
        { "primaries", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI },
+#if defined(HAVE_LIBXML2) || defined(HAVE_JSON_C)
        { "statistics-channels", &cfg_type_statschannels,
          CFG_CLAUSEFLAG_MULTI },
+#else
+       { "statistics-channels", &cfg_type_statschannels,
+         CFG_CLAUSEFLAG_MULTI | CFG_CLAUSEFLAG_NOTCONFIGURED },
+#endif
        { "tls", &cfg_type_tlsconf, CFG_CLAUSEFLAG_MULTI },
        { "view", &cfg_type_view, CFG_CLAUSEFLAG_MULTI },
        { NULL, NULL, 0 }