]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
slaveRefresh: remove B->getSOA
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 14 Sep 2020 19:59:09 +0000 (21:59 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Thu, 24 Sep 2020 12:02:40 +0000 (14:02 +0200)
pdns/slavecommunicator.cc

index d2d8892b86810106ef374a98f64ec605f74aa01c..f31d3d8d7fb08b8646e82f368c6e236f9198ae50 100644 (file)
@@ -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(...) {}