From 4dcfa7b5804c523b9bd4300d9870aa24daf2fc95 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 2 Sep 2024 15:53:11 +1000 Subject: [PATCH] Fix named-checkconf and statistics-channels 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c index b0f262e726..7c3861cbce 100644 --- a/lib/isccfg/namedconf.c +++ b/lib/isccfg/namedconf.c @@ -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 }