]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Clear the LMDB set state when performing a new lookup or list to prevent corruption... 9884/head
authorRobin Geuze <robing@transip.nl>
Wed, 16 Dec 2020 19:37:58 +0000 (20:37 +0100)
committerRobin Geuze <robing@transip.nl>
Wed, 16 Dec 2020 19:37:58 +0000 (20:37 +0100)
modules/lmdbbackend/lmdbbackend.cc

index 020a275f179755c3dec37f77faca8f56c9899063..2497eb63e1327258c2e5ccbb4e48af63113cc23f 100644 (file)
@@ -670,6 +670,11 @@ bool LMDBBackend::list(const DNSName &target, int id, bool include_disabled)
   }
 
   d_lookupdomain = target;
+
+  // Make sure we start with fresh data
+  d_currentrrset.clear();
+  d_currentrrsetpos = 0;
+
   return true;
 }
 
@@ -730,6 +735,10 @@ void LMDBBackend::lookup(const QType &type, const DNSName &qdomain, int zoneId,
   }
 
   d_lookupdomain = hunt;
+
+  // Make sure we start with fresh data
+  d_currentrrset.clear();
+  d_currentrrsetpos = 0;
 }