From b2a9dc9f56f47fa927741a0133838d2ee06709cb Mon Sep 17 00:00:00 2001 From: Erik Winkels Date: Tue, 11 Apr 2017 14:22:30 +0200 Subject: [PATCH] Fix "queries" overflow in dnsdist API. The way it is currently fixed means that matches can still overflow in the web interface because JavaScript has a 2^53 number limit. However, this fix is in line with how earlier cases have been fixed. This fixes issue #5054. --- pdns/dnsdist-web.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index e913b88ba..f82fe5f66 100644 --- a/pdns/dnsdist-web.cc +++ b/pdns/dnsdist-web.cc @@ -349,7 +349,7 @@ static void connectionThread(int sock, ComboAddress remote, string password, str {"order", (int)a->order}, {"pools", pools}, {"latency", (int)(a->latencyUsec/1000.0)}, - {"queries", (int)a->queries}}; + {"queries", (double)a->queries}}; /* sending a latency for a DOWN server doesn't make sense */ if (a->availability == DownstreamState::Availability::Down) { -- 2.40.0