return addKey(name, dspk, active);
}
+void DNSSECKeeper::clearAllCaches() {
+ {
+ Lock l(&s_keycachelock);
+ s_keycache.clear();
+ }
+ Lock l(&s_metacachelock);
+ s_metacache.clear();
+}
+
void DNSSECKeeper::clearCaches(const std::string& name)
{
{
}
s_last_prune=time(0);
}
-}
\ No newline at end of file
+}
bool getNSEC3PARAM(const std::string& zname, NSEC3PARAMRecordContent* n3p=0, bool* narrow=0);
void setNSEC3PARAM(const std::string& zname, const NSEC3PARAMRecordContent& n3p, const bool& narrow=false);
void unsetNSEC3PARAM(const std::string& zname);
+ void clearAllCaches();
void clearCaches(const std::string& name);
bool getPreRRSIGs(DNSBackend& db, const std::string& signer, const std::string& qname, const std::string& wildcardname, const QType& qtype, DNSPacketWriter::Place, vector<DNSResourceRecord>& rrsigs);
bool isPresigned(const std::string& zname);
void startTransaction()
{
- (*d_keymetadb->backends.begin())->startTransaction("", -1);
+ (*d_keymetadb->backends.begin())->startTransaction("", -1);
}
void commitTransaction()
{
- (*d_keymetadb->backends.begin())->commitTransaction();
+ (*d_keymetadb->backends.begin())->commitTransaction();
}
void getFromMeta(const std::string& zname, const std::string& key, std::string& value);
#include <signal.h>
#include "misc.hh"
#include "communicator.hh"
+#include "dnsseckeeper.hh"
static bool s_pleasequit;
string DLPurgeHandler(const vector<string>&parts, Utility::pid_t ppid)
{
extern PacketCache PC;
+ DNSSECKeeper dk;
ostringstream os;
int ret=0;
if(parts.size()>1) {
for (vector<string>::const_iterator i=++parts.begin();i<parts.end();++i) {
ret+=PC.purge(*i);
+ dk.clearCaches(*i);
}
}
- else
+ else {
ret=PC.purge();
+ dk.clearAllCaches();
+ }
+
os<<ret;
return os.str();
}
bool NSEC3Zone=false;
DNSSECKeeper dk;
+ dk.clearCaches(target);
bool securedZone = dk.isSecuredZone(target);
if(dk.getNSEC3PARAM(target, &ns3pr, &narrow)) {
NSEC3Zone=true;