From: bert hubert Date: Thu, 5 Feb 2015 12:24:52 +0000 (+0100) Subject: throw AAAA records in the mix for resolution if we have them lying around, even if... X-Git-Tag: rec-3.7.0~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60c9a54f77a5658e2fc00f8f947989d46d24ef96;p=pdns throw AAAA records in the mix for resolution if we have them lying around, even if we already got a working A record --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index e68853153..b48b07463 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -492,7 +492,19 @@ vector SyncRes::getAddrs(const string &qname, int depth, set cset; + if(t_RC->get(d_now.tv_sec, qname, QType(QType::AAAA), &cset) > 0) { + for(set::const_iterator k=cset.begin();k!=cset.end();++k) { + if(k->ttl > (unsigned int)d_now.tv_sec ) { + ret.push_back(ComboAddress(k->content, 53)); + } + } + } + } + break; + } } if(ret.size() > 1) {