]> 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>
Thu, 12 Sep 2024 03:27:38 +0000 (03:27 +0000)
If neither libxml2 nor libjson_c are available have named-checkconf
fail if a statistics-channels block is specified.

(cherry picked from commit b9246418e897a1db1f6e2a526178168787b588e1)

lib/isccfg/namedconf.c

index b0f262e7267fc0837f8a0a9d2307b245460e590b..7c3861cbce8e8d50573492725137e23e4912669c 100644 (file)
@@ -1260,8 +1260,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 }