]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: fix empty labels check in json stats endpoint
authorEnsar Sarajčić <dev@ensarsarajcic.com>
Mon, 16 Dec 2024 11:22:04 +0000 (12:22 +0100)
committerEnsar Sarajčić <dev@ensarsarajcic.com>
Mon, 16 Dec 2024 11:22:04 +0000 (12:22 +0100)
pdns/dnsdistdist/dnsdist-web.cc

index 91ad9110a7f42ce3f37c49c59d6119d1179a88f6..26c34edc4d14894c8c1fb3b6d04d07a2d7163dd9 100644 (file)
@@ -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<pdns::stat_t*>(&entry.d_value)) {