From: Chris Hofstaedtler Date: Tue, 20 Feb 2018 17:53:44 +0000 (+0100) Subject: dnsdist: update self-answered only for actually sent UDP responses X-Git-Tag: dnsdist-1.3.0~63^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3cac560856ee8b617e6b69f0903c6ae3b777498e;p=pdns dnsdist: update self-answered only for actually sent UDP responses Similar to TCP handler, similar to cacheHits case. --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 2fd7e3095..fc4bbf3fe 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -1259,7 +1259,6 @@ static void processUDPQuery(ClientState& cs, LocalHolders& holders, const struct } if(dq.dh->qr) { // something turned it into a response - g_stats.selfAnswered++; restoreFlags(dh, origFlags); if (!cs.muted) { @@ -1291,6 +1290,8 @@ static void processUDPQuery(ClientState& cs, LocalHolders& holders, const struct { sendUDPResponse(cs.udpFD, response, responseLen, delayMsec, dest, remote); } + + g_stats.selfAnswered++; } return;