From: Chris Hofstaedtler Date: Mon, 14 Sep 2020 19:59:09 +0000 (+0200) Subject: slaveRefresh: remove B->getSOA X-Git-Tag: auth-4.4.0-alpha2~12^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48acf38e2ba011be8ea66f65202ed78b43dc4fa2;p=thirdparty%2Fpdns.git slaveRefresh: remove B->getSOA --- diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index d2d8892b86..f31d3d8d7f 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -941,8 +941,16 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) bool hasSOA = false; SOAData sd; - try{ - hasSOA = B->getSOA(di.zone, sd); + sd.serial = 0; + try { + // Use UeberBackend cache for SOA. Cache gets cleared after AXFR/IXFR. + B->lookup(QType(QType::SOA), di.zone, di.id, nullptr); + DNSZoneRecord zr; + hasSOA = B->get(zr); + if (hasSOA) { + fillSOAData(zr, sd); + while(B->get(zr)); + } } catch(...) {}