From 77ff95be9688348088a09b5e655a1b9a2eba83a9 Mon Sep 17 00:00:00 2001 From: Klaus Darilion Date: Tue, 5 Apr 2016 07:09:21 +0000 Subject: [PATCH] handle SOAs with serial 0 correctly in incoming AXFR (cherry picked from commit d3c9e1df6ce74dee576f81f383f4aa5decea8c62) --- pdns/slavecommunicator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: { -- 2.47.2