From: Ensar Sarajčić Date: Mon, 16 Dec 2024 11:22:04 +0000 (+0100) Subject: dnsdist: fix empty labels check in json stats endpoint X-Git-Tag: dnsdist-2.0.0-alpha0^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc8822a4cf3ca36978c8d0b5d8ed61582a56462c;p=thirdparty%2Fpdns.git dnsdist: fix empty labels check in json stats endpoint --- diff --git a/pdns/dnsdistdist/dnsdist-web.cc b/pdns/dnsdistdist/dnsdist-web.cc index 91ad9110a7..26c34edc4d 100644 --- a/pdns/dnsdistdist/dnsdist-web.cc +++ b/pdns/dnsdistdist/dnsdist-web.cc @@ -931,7 +931,7 @@ static void addStatsToJSONObject(Json::object& obj) if (entry.d_name == "special-memory-usage") { continue; // Too expensive for get-all } - if (entry.d_labels.empty()) { + if (!entry.d_labels.empty()) { continue; // Skip labeled metrics to prevent duplicates } if (const auto& val = std::get_if(&entry.d_value)) {