]> granicus.if.org Git - pdns/commitdiff
don't store empty records in the cache if we did get RRSIGs for a record we did not...
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 28 Feb 2016 18:56:41 +0000 (19:56 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 28 Feb 2016 18:56:41 +0000 (19:56 +0100)
pdns/syncres.cc

index 4332fd714f8e39a864eb110ca956b51ce5812e28..1304bd036ccdcc42459ab38fa8351ced58090764 100644 (file)
@@ -1212,6 +1212,8 @@ int SyncRes::doResolveAt(map<DNSName, pair<ComboAddress, bool> > &nameservers, D
 
        //      cout<<"Have "<<i->second.records.size()<<" records and "<<i->second.signatures.size()<<" signatures for "<<i->first.first.toString();
        //      cout<<'|'<<DNSRecordContent::NumberToType(i->first.second.getCode())<<endl;
+        if(i->second.records.empty()) // this happens when we did store signatures, but passed on the records themselves
+          continue;
         t_RC->replace(d_now.tv_sec, i->first.name, QType(i->first.type), i->second.records, i->second.signatures, lwr.d_aabit, i->first.place == DNSResourceRecord::ANSWER ? ednsmask : boost::optional<Netmask>());
        if(i->first.place == DNSResourceRecord::ANSWER && ednsmask)
          d_wasVariable=true;