]> granicus.if.org Git - pdns/commitdiff
avoid merging old and new additional data, fixes an issue caused by weird Akamai...
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 6 Feb 2014 13:50:35 +0000 (14:50 +0100)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 6 Feb 2014 13:51:05 +0000 (14:51 +0100)
pdns/recursor_cache.cc

index c7ac0a0de3805d522a4ee7347fb093e87ea299b4..14df3a56f371a9778c3722d630c65a19a4f6eb5e 100644 (file)
@@ -242,6 +242,12 @@ void MemRecursorCache::replace(time_t now, const string &qname, const QType& qt,
   else
     ; //cerr<<"\tNot nuking"<<endl;
 
+  // make sure we don't accidentally merge old and new unauth data
+  if(!auth && !ce.d_auth) {
+    ce.d_records.clear();
+    isNew=true;
+  }
+
   // cerr<<"\tHave "<<content.size()<<" records to store\n";
   for(set<DNSResourceRecord>::const_iterator i=content.begin(); i != content.end(); ++i) {
     // cerr<<"To store: "<<i->content<<" with ttl/ttd "<<i->ttl<<endl;