From: Jelte Jansen Date: Thu, 1 Mar 2012 16:18:19 +0000 (+0100) Subject: [1612] log when responding with SERVFAIL X-Git-Tag: trac2351_base~226^2~116^2~41^2~52^2~2^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56f14dee951465a712f2fee1d4dcf36d7b87a4b7;p=thirdparty%2Fkea.git [1612] log when responding with SERVFAIL --- diff --git a/src/bin/auth/auth_messages.mes b/src/bin/auth/auth_messages.mes index 44f8d4bae5..c00b1aac95 100644 --- a/src/bin/auth/auth_messages.mes +++ b/src/bin/auth/auth_messages.mes @@ -264,3 +264,16 @@ NOTIFY request will not be honored. % AUTH_INVALID_STATISTICS_DATA invalid specification of statistics data specified An error was encountered when the authoritiative server specified statistics data which is invalid for the auth specification file. + +% AUTH_RESPONSE_FAILURE exception while building response to query: %1 +This is a debug message, generated by the authoritative server when an +attempt to create a response to a received DNS packet has failed. The +reason for the failure is given in the log message. A SERVFAIL response +is sent back. The most likely cause of this is an error in the data +source implementation; it is either creating bad responses or raising +exceptions itself. + +% AUTH_RESPONSE_FAILURE_UNKNOWN unknown exception while building response to query +This debug message is similar to AUTH_RESPONSE_FAILURE, but further +details about the error are unknown, because it was signaled by something +which is not an exception. This is definitely a bug. diff --git a/src/bin/auth/auth_srv.cc b/src/bin/auth/auth_srv.cc index 9b911db3b3..d99b7a2be3 100644 --- a/src/bin/auth/auth_srv.cc +++ b/src/bin/auth/auth_srv.cc @@ -508,9 +508,12 @@ AuthSrv::processMessage(const IOMessage& io_message, MessagePtr message, buffer, tsig_context); } } - } catch (const isc::Exception&) { + } catch (const std::exception& ex) { + LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_RESPONSE_FAILURE) + .arg(ex.what()); makeErrorMessage(message, buffer, Rcode::SERVFAIL()); } catch (...) { + LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_RESPONSE_FAILURE_UNKNOWN); makeErrorMessage(message, buffer, Rcode::SERVFAIL()); } impl_->resumeServer(server, message, send_answer);