]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Test the most simple condition first 10353/head
authorRemi Gacogne <rgacogne+github@valombre.net>
Tue, 4 May 2021 16:30:47 +0000 (18:30 +0200)
committerGitHub <noreply@github.com>
Tue, 4 May 2021 16:30:47 +0000 (18:30 +0200)
Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/pdns_recursor.cc

index dde05b64f781a287fd3dc1b050935dcf63598214..4b8ce8af5bbafac87d5763543237022ed913e37a 100644 (file)
@@ -1760,7 +1760,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;
             }