From: Remi Gacogne Date: Tue, 4 May 2021 16:30:47 +0000 (+0200) Subject: rec: Test the most simple condition first X-Git-Tag: rec-4.4.4~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10385%2Fhead;p=thirdparty%2Fpdns.git rec: Test the most simple condition first Co-authored-by: Otto Moerbeek (cherry picked from commit 89461c55042e1f0f7d17a511ae3d6c7c39602954) --- 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; }