From: Otto Date: Tue, 20 Jul 2021 12:10:18 +0000 (+0200) Subject: Process potential Drop action after preresolve Lua hook. X-Git-Tag: dnsdist-1.7.0-alpha1~66^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce51bfe2fb86420140fc92f2cb5b7f0aa1cfaa85;p=thirdparty%2Fpdns.git Process potential Drop action after preresolve Lua hook. --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index b325fbc8d3..d52e112ccf 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1939,6 +1939,15 @@ static void startDoResolve(void *p) } } } + else if (t_pdl) { + // preresolve returned true + shouldNotValidate = true; + auto policyResult = handlePolicyHit(appliedPolicy, dc, sr, res, ret, pw); + // haveAnswer case redundant + if (policyResult == PolicyResult::Drop) { + return; + } + } haveAnswer:; if(tracedQuery || res == -1 || res == RCode::ServFail || pw.getHeader()->rcode == RCode::ServFail)