Skip to content

Commit

Permalink
As noted by Fusl, the new DoS measures kill our daemon in case the ro…
Browse files Browse the repository at this point in the history
…ot refresh query times out.
  • Loading branch information
ahupowerdns committed Jan 24, 2015
1 parent c595014 commit 6a6fb05
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pdns/pdns_recursor.cc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1314,7 +1314,14 @@ try
vector<DNSResourceRecord> ret; vector<DNSResourceRecord> ret;


sr.setNoCache(); sr.setNoCache();
int res=sr.beginResolve(".", QType(QType::NS), 1, ret); int res=-1;
try {
res=sr.beginResolve(".", QType(QType::NS), 1, ret);
}
catch(...)
{
L<<Logger::Error<<"Failed to update . records, got an exception"<<endl;
}
if(!res) { if(!res) {
L<<Logger::Notice<<"Refreshed . records"<<endl; L<<Logger::Notice<<"Refreshed . records"<<endl;
last_rootupdate=now.tv_sec; last_rootupdate=now.tv_sec;
Expand Down

0 comments on commit 6a6fb05

Please sign in to comment.