]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Ignore NS records in a RPZ zone received over IXFR 4416/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 2 Sep 2016 07:57:54 +0000 (09:57 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 5 Sep 2016 08:59:46 +0000 (10:59 +0200)
They are already ignored over AXFR, but not over IXFR.
Reported and based on a patch by @42wim (thanks!).

(cherry picked from commit ed8c725224b5192367149897cfaaaf188ab0b910)

pdns/reczones.cc

index 63ccb27e3b0745c310a39f345b2aba3beeb5fbf1..97e1e84fac58d88ce4d3116c987885483dbd5f45 100644 (file)
@@ -347,6 +347,8 @@ void RPZIXFRTracker(const ComboAddress& master, const DNSName& zone, size_t polZ
         luaconfsCopy.dfe.clear(0);
       }
       for(const auto& rr : remove) { // should always contain the SOA
+        if(rr.d_type == QType::NS)
+          continue;
        totremove++;
        if(rr.d_type == QType::SOA) {
          auto oldsr = getRR<SOARecordContent>(rr);
@@ -363,6 +365,8 @@ void RPZIXFRTracker(const ComboAddress& master, const DNSName& zone, size_t polZ
       }
 
       for(const auto& rr : add) { // should always contain the new SOA
+        if(rr.d_type == QType::NS)
+          continue;
        totadd++;
        if(rr.d_type == QType::SOA) {
          auto newsr = getRR<SOARecordContent>(rr);