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