From d2a6575058e557109335c3eb213b5428559503df Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 4 May 2021 18:30:47 +0200 Subject: [PATCH] rec: Test the most simple condition first Co-authored-by: Otto Moerbeek (cherry picked from commit 89461c55042e1f0f7d17a511ae3d6c7c39602954) --- pdns/pdns_recursor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index ab13f9949c..df0f12936d 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -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; } -- 2.47.2