From: Remi Gacogne Date: Tue, 19 Jul 2022 13:25:48 +0000 (+0200) Subject: dnsdist: Fix latency and counters update for UDP cache hits X-Git-Tag: rec-4.8.0-alpha1~63^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11798%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix latency and counters update for UDP cache hits The latency was counted twice, and the frontend-nxdomain, frontend-noerror and frontend-servfail was increased twice as well. --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 55943875d9..75d23d0416 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -1242,19 +1242,6 @@ static bool prepareOutgoingResponse(LocalHolders& holders, ClientState& cs, DNSQ ++g_stats.cacheHits; } - switch (dr.getHeader()->rcode) { - case RCode::NXDomain: - ++g_stats.frontendNXDomain; - break; - case RCode::ServFail: - ++g_stats.frontendServFail; - break; - case RCode::NoError: - ++g_stats.frontendNoError; - break; - } - - doLatencyStats(cs.getProtocol(), 0); // we're not going to measure this return true; }