From: Peter van Dijk Date: Thu, 24 Jan 2013 11:39:51 +0000 (+0000) Subject: Winfried Angele submitted a patch that (a) treats REFUSED more like SERVFAIL (b)... X-Git-Tag: rec-3.5-rc1~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=352b418343e55df4c436ea8763b8f3f16e42518a;p=pdns Winfried Angele submitted a patch that (a) treats REFUSED more like SERVFAIL (b) makes us try additional IPs for the same NS in SERVFAIL/REFUSED cases instead of immediately jumping to the next NS. This commit is tentative. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3074 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 6352e097a..1f76320fb 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -929,6 +929,12 @@ int SyncRes::doResolveAt(set nameservers, string auth, } continue; } + + if(lwr.d_rcode==RCode::ServFail || lwr.d_rcode==RCode::Refused) { + LOG(prefix<first<<" returned a "<< (lwr.d_rcode==RCode::ServFail ? "ServFail" : "Refused") << ", trying sibling IP or NS"<throttle.throttle(d_now.tv_sec,make_tuple(*remoteIP, qname, qtype.getCode()),60,3); // servfail or refused + continue; + } break; // this IP address worked! wasLame:; // well, it didn't @@ -950,11 +956,6 @@ int SyncRes::doResolveAt(set nameservers, string auth, return RCode::ServFail; } - if(lwr.d_rcode==RCode::ServFail) { - LOG(prefix<first<<" returned a ServFail, trying sibling IP or NS"<throttle.throttle(d_now.tv_sec,make_tuple(*remoteIP, qname, qtype.getCode()),60,3); // servfail - continue; - } LOG(prefix<first<<" ("<< remoteIP->toString() <<"), rcode="<