]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: RPZ default policy should also override local data RRs 4215/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 20 Jul 2016 12:49:04 +0000 (14:49 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 20 Jul 2016 12:49:04 +0000 (14:49 +0200)
pdns/rpzloader.cc

index 90a2dace320e6bd7118ffe071425dd9df89f8a44..46bd4c168b31239c0932e76023aa8738e9f8cf81 100644 (file)
@@ -62,9 +62,14 @@ void RPZRecordToPolicy(const DNSRecord& dr, DNSFilterEngine& target, const std::
     }
   }
   else {
-    pol.d_kind = DNSFilterEngine::PolicyKind::Custom;
-    pol.d_custom = dr.d_content;
-    // cerr<<"Wants custom "<<dr.d_content->getZoneRepresentation()<<" for "<<dr.d_name<<": ";
+    if (defpol) {
+      pol=*defpol;
+    }
+    else {
+      pol.d_kind = DNSFilterEngine::PolicyKind::Custom;
+      pol.d_custom = dr.d_content;
+      // cerr<<"Wants custom "<<dr.d_content->getZoneRepresentation()<<" for "<<dr.d_name<<": ";
+    }
   }
 
   if(pol.d_ttl < 0)