]> granicus.if.org Git - pdns/commitdiff
there was a slight chance for the ueberbackend to cache wrong data
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 25 Mar 2011 11:09:33 +0000 (11:09 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 25 Mar 2011 11:09:33 +0000 (11:09 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2099 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/ueberbackend.cc

index 8c2cca30d2e608a3af087e48c6f171fc0c157ee4..c96342288f9cd45cfba75754e4b35b3e6566f744 100644 (file)
@@ -411,6 +411,7 @@ void UeberBackend::lookup(const QType &qtype,const string &qname, DNSPacket *pkt
     int cstat=cacheHas(d_question, d_answers);
     if(cstat<0) { // nothing
       d_negcached=d_cached=false;
+      d_answers.clear(); 
       (d_handle.d_hinterBackend=backends[d_handle.i++])->lookup(qtype, qname,pkt_p,zoneId);
     } 
     else if(cstat==0) {
@@ -475,10 +476,6 @@ UeberBackend::handle::~handle()
   instances--;
 }
 
-
-
-
-
 bool UeberBackend::handle::get(DNSResourceRecord &r)
 {
   DLOG(L << "Ueber get() was called for a "<<qtype.getName()<<" record" << endl);