From: Remi Gacogne Date: Mon, 2 Sep 2019 08:59:45 +0000 (+0200) Subject: dnsdist: Display the DoH and DoT binds in the web view X-Git-Tag: dnsdist-1.4.0-rc3~45^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50a8009804c44bad589c4a673c726b9cee1635cd;p=pdns dnsdist: Display the DoH and DoT binds in the web view --- diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index 11df6a9cc..08e289f9d 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -860,15 +860,16 @@ static void connectionThread(int sock, ComboAddress remote) if(!acl.empty()) acl += ", "; acl+=s; } - string localaddresses; + string localaddressesStr; + std::set localaddresses; for(const auto& front : g_frontends) { - if (front->tcp) { - continue; - } - if (!localaddresses.empty()) { - localaddresses += ", "; + localaddresses.insert(front->local.toStringWithPort()); + } + for (const auto& addr : localaddresses) { + if (!localaddressesStr.empty()) { + localaddressesStr += ", "; } - localaddresses += front->local.toStringWithPort(); + localaddressesStr += addr; } Json my_json = Json::object { @@ -882,7 +883,7 @@ static void connectionThread(int sock, ComboAddress remote) { "cache-hit-response-rules", cacheHitResponseRules}, { "self-answered-response-rules", selfAnsweredResponseRules}, { "acl", acl}, - { "local", localaddresses}, + { "local", localaddressesStr}, { "dohFrontends", dohs } }; resp.headers["Content-Type"] = "application/json";