From: Remi Gacogne Date: Tue, 23 Aug 2016 08:47:23 +0000 (+0200) Subject: dnsdist: Fix invalid outstanding count for {A,I}XFR over TCP X-Git-Tag: dnsdist-1.1.0-beta1~10^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4348%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix invalid outstanding count for {A,I}XFR over TCP --- diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index c76cb1e196..9b71b356e1 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -415,8 +415,11 @@ void* tcpClientThread(int pipefd) readn2WithTimeout(dsock, answerbuffer, rlen, ds->tcpRecvTimeout); char* response = answerbuffer; uint16_t responseLen = rlen; - --ds->outstanding; - outstanding = false; + if (outstanding) { + /* might be false for {A,I}XFR */ + --ds->outstanding; + outstanding = false; + } if (rlen < sizeof(dnsheader)) { break;