From 8403ade9fc1f581d33bd8ced1e6b8d4ef9fe2915 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Fri, 1 Aug 2014 09:34:00 +0200 Subject: [PATCH] fix purge zone$ and lookup for labels with spaces --- pdns/packetcache.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/packetcache.cc b/pdns/packetcache.cc index 7db48e1fa..764280877 100644 --- a/pdns/packetcache.cc +++ b/pdns/packetcache.cc @@ -208,7 +208,7 @@ int PacketCache::purge(const string &match) cmap_t::const_iterator start=iter; for(; iter != d_map.end(); ++iter) { - if(!iter->qname.compare(0, zone.size(), zone)) { + if(iter->qname.compare(0, zone.size(), zone) != 0) { break; } delcount++; @@ -268,7 +268,7 @@ bool PacketCache::getEntryLocked(const string &qname, const QType& qtype, CacheE string PacketCache::pcReverse(const string &content) { string tmp = string(content.rbegin(), content.rend()); - return toLower(boost::replace_all_copy(tmp, ".", " "))+" "; + return toLower(boost::replace_all_copy(tmp, ".", "\t"))+"\t"; } -- 2.40.0