From: Klaus Darilion Date: Tue, 5 Apr 2016 07:09:21 +0000 (+0000) Subject: handle SOAs with serial 0 correctly in incoming AXFR X-Git-Tag: auth-3.4.11~4^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4455%2Fhead;p=thirdparty%2Fpdns.git handle SOAs with serial 0 correctly in incoming AXFR (cherry picked from commit d3c9e1df6ce74dee576f81f383f4aa5decea8c62) --- diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index e068904784..14e09b47de 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -146,6 +146,7 @@ void CommunicatorClass::suck(const string &domain,const string &remote) bool first=true; bool firstNSEC3=true; + bool soa_received = false; unsigned int soa_serial = 0; set nsset, qnames, secured; vector rrs; @@ -198,11 +199,12 @@ void CommunicatorClass::suck(const string &domain,const string &remote) continue; } case QType::SOA: { - if(soa_serial != 0) + if(soa_received) continue; //skip the last SOA SOAData sd; fillSOAData(rr.content,sd); soa_serial = sd.serial; + soa_received = true; break; } case QType::NS: {