Permalink
Browse files

avoid merging old and new additional data, fixes an issue caused by w…

…eird Akamai behaviour
  • Loading branch information...
1 parent 6b149d0 commit 6196f908e97cd8334e7e9f857689b341d8a59641 @Habbie Habbie committed Feb 6, 2014
Showing with 6 additions and 0 deletions.
  1. +6 −0 pdns/recursor_cache.cc
@@ -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;

0 comments on commit 6196f90

Please sign in to comment.