]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Partial backport of #10111: Handle policy (if needed) after postresolve 10227/head
authorOtto <otto.moerbeek@open-xchange.com>
Fri, 26 Mar 2021 09:59:15 +0000 (10:59 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 26 Mar 2021 09:59:15 +0000 (10:59 +0100)
I did not take the Lua changes, as there is a (slight) chance they are disruptive.

pdns/pdns_recursor.cc

index 99a19520683a622fad8c6ff97b3a28ab65147d95..9bd6bf860b33a4fbf19b93a033e5a010a69605ba 100644 (file)
@@ -1619,6 +1619,11 @@ static void startDoResolve(void *p)
 
        if (t_pdl && t_pdl->postresolve(dq, res)) {
           shouldNotValidate = true;
+          auto policyResult = handlePolicyHit(appliedPolicy, dc, sr, res, ret, pw);
+          // haveAnswer case redundant
+          if (policyResult == PolicyResult::Drop) {
+            return;
+          }
         }
       }
     }