]> git.ipfire.org Git - thirdparty/pdns.git/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>
Mon, 19 Dec 2016 17:20:47 +0000 (18:20 +0100)
Closes #4342

pdns/reczones.cc

index ad165c4366fa2aab508647b23775b0c7f814de54..99eae9c6cdaaf1ad2732ab2000a1460a9c19a620 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);
        }