]> granicus.if.org Git - pdns/commitdiff
Unconfuse the RPZ summary
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 19 Dec 2016 17:20:47 +0000 (18:20 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 14 Feb 2017 16:01:06 +0000 (17:01 +0100)
Closes #4342

(cherry picked from commit 00febe394033d2ea53ecbcf135ac94de6ba4be08)

pdns/reczones.cc

index 21021e185b730df3216a5acfd36010257c07be27..5e6afc04ddea4f44a0adaf51114ac27d7ba0a19b 100644 (file)
@@ -349,7 +349,6 @@ void RPZIXFRTracker(const ComboAddress& master, const DNSName& zone, boost::opti
       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);
          if(oldsr && oldsr->d_st.serial == oursr->d_st.serial) {
@@ -359,6 +358,7 @@ void RPZIXFRTracker(const ComboAddress& master, const DNSName& zone, boost::opti
            L<<Logger::Error<<"GOT WRONG SOA SERIAL REMOVAL, SHOULD TRIGGER WHOLE RELOAD"<<endl;
        }
        else {
+          totremove++;
          L<<Logger::Info<<"Had removal of "<<rr.d_name<<endl;
          RPZRecordToPolicy(rr, luaconfsCopy.dfe, false, defpol, polZone);
        }
@@ -367,7 +367,6 @@ void RPZIXFRTracker(const ComboAddress& master, const DNSName& zone, boost::opti
       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);
          //      L<<Logger::Info<<"New SOA serial for "<<zone<<": "<<newsr->d_st.serial<<endl;
@@ -376,6 +375,7 @@ void RPZIXFRTracker(const ComboAddress& master, const DNSName& zone, boost::opti
          }
        }
        else {
+          totadd++;
          L<<Logger::Info<<"Had addition of "<<rr.d_name<<endl;
          RPZRecordToPolicy(rr, luaconfsCopy.dfe, true, defpol, polZone);
        }