From b76c5f3a69659c3d93282d2d3cb6de4a238c5b29 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Fri, 30 Nov 2018 08:14:42 +0100 Subject: [PATCH] auth: load serial in slaveRefresh() --- pdns/slavecommunicator.cc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index 27d6e0542..138441a9c 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -923,13 +923,20 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) d_failedSlaveRefresh.erase(di.zone); } - uint32_t theirserial = ssr.d_freshness[di.id].theirSerial, ourserial = di.serial; + bool hasSOA = false; + SOAData sd; + try{ + hasSOA = B->getSOA(di.zone, sd); + } + catch(...) {} + + uint32_t theirserial = ssr.d_freshness[di.id].theirSerial, ourserial = sd.serial; if(rfc1982LessThan(theirserial, ourserial) && ourserial != 0 && !::arg().mustDo("axfr-lower-serial")) { g_log< their serial "<< theirserial << endl; di.backend->setFresh(di.id); } - else if(theirserial == ourserial) { + else if(hasSOA && theirserial == ourserial) { uint32_t maxExpire=0, maxInception=0; if(dk.isPresigned(di.zone)) { B->lookup(QType(QType::RRSIG), di.zone); // can't use DK before we are done with this lookup! @@ -968,7 +975,12 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) } } else { - g_log<