summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 844077cf4..cea1c4a43 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -253,6 +253,15 @@ DNSRequest* DNS::AddQuery(DNSHeader *header, int &id, const char* original)
return req;
}
+int DNS::ClearCache()
+{
+ /* This ensures the buckets are reset to sane levels */
+ int rv = this->cache->size();
+ delete this->cache;
+ this->cache = new dnscache();
+ return rv;
+}
+
void DNS::Rehash()
{
insp_inaddr addr;