Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
64b9c908
Commit
64b9c908
authored
Jul 04, 2013
by
Marcin Siodelski
Browse files
[2977] Log debug message if the received DNS Update response is invalid.
parent
d0d6ad31
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/d2/d2_messages.mes
View file @
64b9c908
...
...
@@ -96,6 +96,11 @@ has been invoked.
This is a debug message issued when the Dhcp-Ddns application encounters an
unrecoverable error from within the event loop.
% DHCP_DDNS_INVALID_RESPONSE received response to DNS Update message is malformed: %1
This is a debug message issued when the DHCP-DDNS application encountered an error
while decoding a response to DNS Update message. Typically, this error will be
encountered when a response message is malformed.
% DHCP_DDNS_PROCESS_INIT application init invoked
This is a debug message issued when the Dhcp-Ddns application enters
its init method.
...
...
src/bin/d2/dns_client.cc
View file @
64b9c908
...
...
@@ -13,6 +13,7 @@
// PERFORMANCE OF THIS SOFTWARE.
#include
<d2/dns_client.h>
#include
<d2/d2_log.h>
#include
<dns/messagerenderer.h>
namespace
isc
{
...
...
@@ -82,17 +83,22 @@ DNSClientImpl::~DNSClientImpl() {
void
DNSClientImpl
::
operator
()(
asiodns
::
IOFetch
::
Result
result
)
{
// @todo More sanity checks here. Also, there is a question, what happens if
// the exception is thrown here.
// Get the status from IO. If no success, we just call user's callback
// and pass the status code.
DNSClient
::
Status
status
=
getStatus
(
result
);
if
(
status
==
DNSClient
::
SUCCESS
)
{
InputBuffer
response_buf
(
in_buf_
->
getData
(),
in_buf_
->
getLength
());
// Server's response may be corrupted. In such case, fromWire will
// throw an exception. We want to catch this exception to return
// appropriate status code to the caller and log this event.
try
{
response_
->
fromWire
(
response_buf
);
}
catch
(
const
Exception
&
ex
)
{
status
=
DNSClient
::
INVALID_RESPONSE
;
LOG_DEBUG
(
dctl_logger
,
DBGLVL_TRACE_DETAIL
,
DHCP_DDNS_INVALID_RESPONSE
).
arg
(
ex
.
what
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment