BIND 10 trac1824, updated. 96c135a9247ae93f5ba5c8843b72e7c34aa38825 [1824] More descriptive error strings if the sendmsg function fails.

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Dec 9 17:11:34 UTC 2013


The branch, trac1824 has been updated
       via  96c135a9247ae93f5ba5c8843b72e7c34aa38825 (commit)
      from  5862eb4c980b550d5206011d4db3b3d2fc649d05 (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 96c135a9247ae93f5ba5c8843b72e7c34aa38825
Author: Marcin Siodelski <marcin at isc.org>
Date:   Mon Dec 9 18:11:26 2013 +0100

    [1824] More descriptive error strings if the sendmsg function fails.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcp/iface_mgr.cc       |    6 ++++--
 src/lib/dhcp/pkt_filter_inet.cc |    5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/iface_mgr.cc b/src/lib/dhcp/iface_mgr.cc
index 41a81f1..66738ce 100644
--- a/src/lib/dhcp/iface_mgr.cc
+++ b/src/lib/dhcp/iface_mgr.cc
@@ -26,7 +26,8 @@
 #include <exceptions/exceptions.h>
 #include <util/io/pktinfo_utilities.h>
 
-
+#include <cstring>
+#include <errno.h>
 #include <fstream>
 #include <sstream>
 
@@ -906,7 +907,8 @@ IfaceMgr::send(const Pkt6Ptr& pkt) {
 
     result = sendmsg(getSocket(*pkt), &m, 0);
     if (result < 0) {
-        isc_throw(SocketWriteError, "Pkt6 send failed: sendmsg() returned " << result);
+        isc_throw(SocketWriteError, "pkt6 send failed: sendmsg() returned"
+                  " with an error: " << strerror(errno));
     }
 
     return (result);
diff --git a/src/lib/dhcp/pkt_filter_inet.cc b/src/lib/dhcp/pkt_filter_inet.cc
index 772d453..1694798 100644
--- a/src/lib/dhcp/pkt_filter_inet.cc
+++ b/src/lib/dhcp/pkt_filter_inet.cc
@@ -16,6 +16,8 @@
 #include <dhcp/iface_mgr.h>
 #include <dhcp/pkt4.h>
 #include <dhcp/pkt_filter_inet.h>
+#include <errno.h>
+#include <cstring>
 
 using namespace isc::asiolink;
 
@@ -242,7 +244,8 @@ PktFilterInet::send(const Iface&, uint16_t sockfd,
 
     int result = sendmsg(sockfd, &m, 0);
     if (result < 0) {
-        isc_throw(SocketWriteError, "pkt4 send failed");
+        isc_throw(SocketWriteError, "pkt4 send failed: sendmsg() returned "
+                  " with an error: " << strerror(errno));
     }
 
     return (result);



More information about the bind10-changes mailing list