From 2f95ab40dd9e3bf9b403afaae74dd98db2254203 Mon Sep 17 00:00:00 2001 From: Robin Geuze Date: Tue, 6 Jun 2017 20:27:19 +0200 Subject: [PATCH] Change dnsdist stats functions to always return lowercase names --- pdns/dnsdist-lua.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index a56181b87..d154322fa 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -158,7 +158,7 @@ std::unordered_map>> getGenResponses(u vector> rcounts; rcounts.reserve(counts.size()); for(const auto& c : counts) - rcounts.push_back(make_pair(c.second, c.first)); + rcounts.push_back(make_pair(c.second, c.first.makeLowerCase())); sort(rcounts.begin(), rcounts.end(), [](const decltype(rcounts)::value_type& a, const decltype(rcounts)::value_type& b) { @@ -1351,7 +1351,7 @@ vector> setupLua(bool client, const std::string& confi vector> rcounts; rcounts.reserve(counts.size()); for(const auto& c : counts) - rcounts.push_back(make_pair(c.second, c.first)); + rcounts.push_back(make_pair(c.second, c.first.makeLowerCase())); sort(rcounts.begin(), rcounts.end(), [](const decltype(rcounts)::value_type& a, const decltype(rcounts)::value_type& b) { -- 2.49.0