From fdb47c9f83adf4f57810fdb2f615c31a94534d5e Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 23 Aug 2016 10:47:23 +0200 Subject: [PATCH] dnsdist: Fix invalid outstanding count for {A,I}XFR over TCP --- pdns/dnsdist-tcp.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; -- 2.47.2