From 0b02f1436d2ddd8646f53d648e8ef81008536a20 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 19 Jul 2022 15:25:48 +0200 Subject: [PATCH] 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. --- pdns/dnsdist.cc | 13 ------------- 1 file changed, 13 deletions(-) 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; } -- 2.47.2