From 60c9a54f77a5658e2fc00f8f947989d46d24ef96 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 5 Feb 2015 13:24:52 +0100 Subject: [PATCH] throw AAAA records in the mix for resolution if we have them lying around, even if we already got a working A record --- pdns/syncres.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) { -- 2.49.0