]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Test the most simple condition first 10385/head
authorRemi Gacogne <rgacogne+github@valombre.net>
Tue, 4 May 2021 16:30:47 +0000 (18:30 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Mon, 10 May 2021 14:17:15 +0000 (16:17 +0200)
Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
(cherry picked from commit 89461c55042e1f0f7d17a511ae3d6c7c39602954)

pdns/pdns_recursor.cc

index ab13f9949ca8e50e4ff07be2839fd5a40b254823..df0f12936df5c4e5d1f98d5408042c27ed73c59a 100644 (file)
@@ -1551,7 +1551,7 @@ static void startDoResolve(void *p)
         else {
           auto policyResult = handlePolicyHit(appliedPolicy, dc, sr, res, ret, pw);
           if (policyResult == PolicyResult::HaveAnswer) {
-            if (dq.qtype == QType::AAAA && answerIsNOData(dc->d_mdp.d_qtype, res, ret) && g_dns64Prefix) {
+            if (g_dns64Prefix && dq.qtype == QType::AAAA && answerIsNOData(dc->d_mdp.d_qtype, res, ret)) {
               res = getFakeAAAARecords(dq.qname, *g_dns64Prefix, ret);
               shouldNotValidate = true;
             }