]> granicus.if.org Git - pdns/commitdiff
don't count rule matches is the action was 'None'
authorbert hubert <bert.hubert@netherlabs.nl>
Mon, 13 Apr 2015 20:13:33 +0000 (22:13 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Mon, 13 Apr 2015 20:13:33 +0000 (22:13 +0200)
pdns/dnsdist.cc

index e7fe21082c28067ec5c4aab81adb367557f9f6e3..d21d5f0d5ef926df2a0b37c47b75dc1b0e42d295 100644 (file)
@@ -356,10 +356,12 @@ try
 
       for(const auto& lr : *localRulactions) {
        if(lr.first->matches(remote, qname, qtype, dh, len)) {
-         lr.first->d_matches++;
+
          action=(*lr.second)(remote, qname, qtype, dh, len, &ruleresult);
-         if(action != DNSAction::Action::None)
+         if(action != DNSAction::Action::None) {
+           lr.first->d_matches++;
            break;
+         }
        }
       }
       switch(action) {