]> granicus.if.org Git - pdns/commitdiff
rec: Cleanup the netmask trees used for the ECS index on removals
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 12 Sep 2018 11:29:05 +0000 (13:29 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 12 Sep 2018 11:29:05 +0000 (13:29 +0200)
Otherwise the intermediary nodes will remain and consume memory
until the tree is deleted from the index, which might never happen
if we still have active entries for this specific qname and qtype.

pdns/recursor_cache.hh

index 163465be88dd902a4f4b5ba0837a98c68ff7444b..9b4f3f6e077ef0e3a7bf0a081685f8f681ff1565 100644 (file)
@@ -107,7 +107,7 @@ private:
   class ECSIndexEntry
   {
   public:
-    ECSIndexEntry(const DNSName& qname, uint16_t qtype): d_qname(qname), d_qtype(qtype)
+    ECSIndexEntry(const DNSName& qname, uint16_t qtype): d_nmt(true), d_qname(qname), d_qtype(qtype)
     {
     }