BIND 10 master, updated. 01496b7eff80566dd62b4d308ac8c932a16ed13e [master] update Changelog for merge of #2494
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Dec 17 10:25:02 UTC 2012
The branch, master has been updated
via 01496b7eff80566dd62b4d308ac8c932a16ed13e (commit)
via db92f30af10e6688a7dc117b254cb821e54a6d95 (commit)
via 259634a0145c978f78f87cf84724553473e109fc (commit)
via 99c3c7f2457327d843c7f8d1e1b5adcb2f826373 (commit)
from 09d7669d9da37bcf44c914f378715f71e633180c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 01496b7eff80566dd62b4d308ac8c932a16ed13e
Author: Jelte Jansen <jelte at isc.org>
Date: Mon Dec 17 11:22:14 2012 +0100
[master] update Changelog for merge of #2494
commit db92f30af10e6688a7dc117b254cb821e54a6d95
Merge: 09d7669 259634a
Author: Jelte Jansen <jelte at isc.org>
Date: Mon Dec 17 10:38:16 2012 +0100
[master] Merge branch 'trac2494'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
src/lib/asiodns/asiodns_messages.mes | 16 ++++++++++++++++
src/lib/asiodns/sync_udp_server.cc | 8 +++++++-
src/lib/asiodns/udp_server.cc | 8 +++++++-
4 files changed, 38 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 32a81e5..2b0688a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+527. [bug] jelte
+ Fixed a bug in the synchronous UDP server code where unexpected
+ errors from ASIO or the system libraries could cause b10-auth to
+ stop. In asynchronous mode these errors would be ignored
+ completely. Both types have been updated to report the problem with
+ an ERROR log message, drop the packet, and continue service.
+ (Trac #2494, git db92f30af10e6688a7dc117b254cb821e54a6d95)
+
526. [bug] stephen
Miscellaneous fixes to DHCP code including rationalisation of
some methods in LeaseMgr and resolving some Doxygen/cppcheck
diff --git a/src/lib/asiodns/asiodns_messages.mes b/src/lib/asiodns/asiodns_messages.mes
index 8fbafdd..db2902e 100644
--- a/src/lib/asiodns/asiodns_messages.mes
+++ b/src/lib/asiodns/asiodns_messages.mes
@@ -53,6 +53,22 @@ The asynchronous I/O code encountered an error when trying to send data to
the specified address on the given protocol. The number of the system
error that caused the problem is given in the message.
+% ASIODNS_UDP_ASYNC_SEND_FAIL Error sending UDP packet to %1: %2
+The low-level ASIO library reported an error when trying to send a UDP
+packet in asynchronous UDP mode. This can be any error reported by
+send_to(), and can indicate problems such as too high a load on the network,
+or a problem in the underlying library or system.
+This packet is dropped and will not be sent, but service should resume
+normally.
+If you see a single occurrence of this message, it probably does not
+indicate any significant problem, but if it is logged often, it is probably
+a good idea to inspect your network traffic.
+
+% ASIODNS_UDP_SYNC_SEND_FAIL Error sending UDP packet to %1: %2
+The low-level ASIO library reported an error when trying to send a UDP
+packet in synchronous UDP mode. See ASIODNS_UDP_ASYNC_SEND_FAIL for
+more information.
+
% ASIODNS_UNKNOWN_ORIGIN unknown origin for ASIO error code %1 (protocol: %2, address %3)
An internal consistency check on the origin of a message from the
asynchronous I/O module failed. This may indicate an internal error;
diff --git a/src/lib/asiodns/sync_udp_server.cc b/src/lib/asiodns/sync_udp_server.cc
index 0c577f2..95e1c72 100644
--- a/src/lib/asiodns/sync_udp_server.cc
+++ b/src/lib/asiodns/sync_udp_server.cc
@@ -148,9 +148,15 @@ SyncUDPServer::handleRead(const asio::error_code& ec, const size_t length) {
return;
}
+ asio::error_code ec;
socket_->send_to(asio::buffer(output_buffer_->getData(),
output_buffer_->getLength()),
- sender_);
+ sender_, 0, ec);
+ if (ec) {
+ LOG_ERROR(logger, ASIODNS_UDP_SYNC_SEND_FAIL).
+ arg(sender_.address().to_string()).
+ arg(ec.message());
+ }
}
// And schedule handling another socket.
diff --git a/src/lib/asiodns/udp_server.cc b/src/lib/asiodns/udp_server.cc
index 0f5456b..bdf79a7 100644
--- a/src/lib/asiodns/udp_server.cc
+++ b/src/lib/asiodns/udp_server.cc
@@ -299,10 +299,16 @@ UDPServer::operator()(asio::error_code ec, size_t length) {
// Begin an asynchronous send, and then yield. When the
// send completes, we will resume immediately after this point
// (though we have nothing further to do, so the coroutine
- // will simply exit at that time).
+ // will simply exit at that time, after reporting an error if
+ // there was one).
CORO_YIELD data_->socket_->async_send_to(
buffer(data_->respbuf_->getData(), data_->respbuf_->getLength()),
*data_->sender_, *this);
+ if (ec) {
+ LOG_ERROR(logger, ASIODNS_UDP_ASYNC_SEND_FAIL).
+ arg(data_->sender_->address().to_string()).
+ arg(ec.message());
+ }
}
}
More information about the bind10-changes
mailing list