From 2b1b40548462a139c756dc8b595b3fe4949aea22 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 8 Jan 2015 13:01:30 +0100 Subject: [PATCH] don't reprime the root because we discovered a delegation loop. No longer terminate a query when this happens. Do terminate a query if more than 50 throttled queries. Improve --trace output a bit. --- pdns/syncres.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index df184f1b63..aaa9b7a4c1 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -523,8 +523,9 @@ void SyncRes::getBestNSFromCache(const string &qname, const QType& qtype, set ns; *flawedNSSet = false; @@ -561,10 +562,12 @@ void SyncRes::getBestNSFromCache(const string &qname, const QType& qtype, set::const_iterator j=beenthere.begin();j!=beenthere.end();++j) { - LOG(prefix<qname<<"|"<qtype)<<" ("<<(unsigned int)j->bestns.size()<<")"<qname<<"|"<qtype)<<" ("<<(unsigned int)j->bestns.size()<<")"< 4) - throw ImmediateServFailException("query ended up doubting the root, reprimed"); + LOG(prefix< nameservers, string auth, } else { s_outqueries++; d_outqueries++; - if(d_outqueries > s_maxqperq) throw ImmediateServFailException("more than "+lexical_cast(s_maxqperq)+" (max-qperq) queries sent while resolving "+qname); + if(d_outqueries + d_throttledqueries > s_maxqperq) throw ImmediateServFailException("more than "+lexical_cast(s_maxqperq)+" (max-qperq) queries sent while resolving "+qname); TryTCP: if(doTCP) { LOG(prefix<toStringWithPort() <