From: Robin Geuze Date: Tue, 6 Jun 2017 18:27:19 +0000 (+0200) Subject: Change dnsdist stats functions to always return lowercase names X-Git-Tag: rec-4.1.0-alpha1~63^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f95ab40dd9e3bf9b403afaae74dd98db2254203;p=thirdparty%2Fpdns.git Change dnsdist stats functions to always return lowercase names --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index a56181b878..d154322fae 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) {