Commit 1e3f8521 authored by Evan Hunt's avatar Evan Hunt
Browse files

Return SERVFAIL if an exception is encountered during doQuery().

This is very preliminary; it should also log (at least to cerr)
the exception that occurred, and should clear the message sections
of any data they may have contained before the exception was thrown.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1318 e5f2f494-b856-4b98-b285-d166d9295462
parent 943f1cdb
......@@ -150,8 +150,12 @@ AuthSrv::processMessage(InputBuffer& request_buffer,
message.setDNSSECSupported(dnssec_ok);
message.setUDPSize(4096); // XXX: hardcoding
Query query(message, dnssec_ok);
impl_->data_sources_.doQuery(query);
try {
Query query(message, dnssec_ok);
impl_->data_sources_.doQuery(query);
} catch(...) {
message.setRcode(Rcode::SERVFAIL());
}
response_renderer.setLengthLimit(udp_buffer ? remote_bufsize : 65535);
message.toWire(response_renderer);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment