Skip to content

Commit

Permalink
Don't crash when reload-acls encounters garbage. Fixes PowerDNS#330
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2323 d19b8d6e-7fed-0310-83ef-9ca221ded41b
  • Loading branch information
Peter van Dijk committed Dec 23, 2011
1 parent d2322a5 commit a97395c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pdns/rec_channel_rec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,14 @@ string RecursorControlParser::getAnswer(const string& question, RecursorControlP
}
catch(std::exception& e)
{
L<<Logger::Error<<"reloading ACLs failed (Exception: "<<e.what()<<")"<<endl;
return e.what() + string("\n");
}
catch(AhuException& ae)
{
L<<Logger::Error<<"reloading ACLs failed (AhuException: "<<ae.reason<<")"<<endl;
return ae.reason + string("\n");
}
return "ok\n";
}

Expand Down

0 comments on commit a97395c

Please sign in to comment.