]> granicus.if.org Git - pdns/commitdiff
dnsdist: Display the DoH and DoT binds in the web view
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 2 Sep 2019 08:59:45 +0000 (10:59 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 2 Sep 2019 09:00:00 +0000 (11:00 +0200)
pdns/dnsdist-web.cc

index 11df6a9ccc826509820bea3f80684bc55717df49..08e289f9d55ebd2db8727e751d00725d1bd86dcf 100644 (file)
@@ -860,15 +860,16 @@ static void connectionThread(int sock, ComboAddress remote)
         if(!acl.empty()) acl += ", ";
         acl+=s;
       }
-      string localaddresses;
+      string localaddressesStr;
+      std::set<std::string> 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";