]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Process potential Drop action after preresolve Lua hook.
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 20 Jul 2021 12:10:18 +0000 (14:10 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 20 Jul 2021 12:10:18 +0000 (14:10 +0200)
pdns/pdns_recursor.cc

index b325fbc8d3eda3f17b6e7499c657b43452697e5e..d52e112ccfd1f19125b95388c8ec3f31e899e4d7 100644 (file)
@@ -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)