From: bert hubert Date: Mon, 13 Apr 2015 20:13:33 +0000 (+0200) Subject: don't count rule matches is the action was 'None' X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~88^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f658aeffdc67f67b7e27deb8ed81794fe6005f60;p=thirdparty%2Fpdns.git don't count rule matches is the action was 'None' --- diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index e7fe21082c..d21d5f0d5e 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -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) {