From: Remi Gacogne Date: Mon, 16 Nov 2020 10:49:19 +0000 (+0100) Subject: dnsdist: Fix "in-flight" queries counter for XFR, plus a few typos X-Git-Tag: auth-4.5.0-alpha0~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d79d50486aca0ee5070ab1e93aeb7914eedc9e15;p=thirdparty%2Fpdns.git dnsdist: Fix "in-flight" queries counter for XFR, plus a few typos --- diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index db17474101..a8d9963d23 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -290,9 +290,9 @@ static IOState sendQueuedResponses(std::shared_ptr& static bool handleResponseSent(std::shared_ptr& state, const struct timeval& now) { - --state->d_currentQueriesCount; - if (!state->d_isXFR) { + --state->d_currentQueriesCount; + const auto& currentResponse = state->d_currentResponse; if (state->d_selfGeneratedResponse == false && currentResponse.d_connection && currentResponse.d_connection->getDS()) { const auto& ds = currentResponse.d_connection->getDS(); @@ -410,7 +410,7 @@ IOState IncomingTCPConnectionState::sendResponse(std::shared_ptr& state, const struct timeval& now, TCPResponse&& response) { - // if we already reading a query (not the query size, mind you), or sending a response we need to either queue the response + // if we were already reading a query (not the query size, mind you), or sending a response we need to queue the response // otherwise we can start sending it right away if (state->d_state == IncomingTCPConnectionState::State::idle || state->d_state == IncomingTCPConnectionState::State::readingQuerySize) { diff --git a/pdns/dnsdistdist/dnsdist-tcp-downstream.hh b/pdns/dnsdistdist/dnsdist-tcp-downstream.hh index fdfcfbbd86..fa4c950ae1 100644 --- a/pdns/dnsdistdist/dnsdist-tcp-downstream.hh +++ b/pdns/dnsdistdist/dnsdist-tcp-downstream.hh @@ -110,7 +110,7 @@ public: return d_enableFastOpen; } - /* whether we can acept new queries FOR THE SAME CLIENT */ + /* whether we can accept new queries FOR THE SAME CLIENT */ bool canAcceptNewQueries() const { if (d_usedForXFR || d_connectionDied) {