From: Erik Winkels Date: Tue, 11 Apr 2017 12:22:30 +0000 (+0200) Subject: Fix "queries" overflow in dnsdist API. X-Git-Tag: rec-4.1.0-alpha1~163^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5234%2Fhead;p=thirdparty%2Fpdns.git 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. --- diff --git a/pdns/dnsdist-web.cc b/pdns/dnsdist-web.cc index e913b88ba2..f82fe5f66d 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) {