From 89461c55042e1f0f7d17a511ae3d6c7c39602954 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 --- 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 dde05b64f7..4b8ce8af5b 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -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; } -- 2.47.2