From d3c9e1df6ce74dee576f81f383f4aa5decea8c62 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 --- pdns/slavecommunicator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index b53aaac4b1..47a952f46f 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -147,6 +147,7 @@ void CommunicatorClass::suck(const DNSName &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; @@ -199,11 +200,12 @@ void CommunicatorClass::suck(const DNSName &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