From: Otto Moerbeek Date: Tue, 4 Feb 2020 09:31:00 +0000 (+0100) Subject: Fix merge botch X-Git-Tag: dnsdist-1.5.0-alpha1~21^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a264db6bd2fbf06596a7c182ac9670b0b4490960;p=thirdparty%2Fpdns.git Fix merge botch --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 05bd59e965..b24a52d60f 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -951,16 +951,16 @@ vector SyncRes::getAddrs(const DNSName &qname, unsigned int depth, } } } - } - } else { - // We have some IPv4 records, don't bother with going out to get IPv6, but do consult the cache - // Once IPv6 adoption matters, this needs to be revisited - res_t cset; - if (s_RC->get(d_now.tv_sec, qname, QType(QType::AAAA), false, &cset, d_cacheRemote) > 0) { - for (const auto &i : cset) { - if (i.d_ttl > (unsigned int)d_now.tv_sec ) { - if (auto rec = getRR(i)) { - ret.push_back(rec->getCA(53)); + } else { + // We have some IPv4 records, don't bother with going out to get IPv6, but do consult the cache + // Once IPv6 adoption matters, this needs to be revisited + res_t cset; + if (s_RC->get(d_now.tv_sec, qname, QType(QType::AAAA), false, &cset, d_cacheRemote) > 0) { + for (const auto &i : cset) { + if (i.d_ttl > (unsigned int)d_now.tv_sec ) { + if (auto rec = getRR(i)) { + ret.push_back(rec->getCA(53)); + } } } }