From: Mark Andrews Date: Mon, 7 Sep 2009 02:14:40 +0000 (+0000) Subject: 2670. [bug] Unexpected connect failures failed to log enough X-Git-Tag: v9.5.2rc1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4db96e8b273de8bb8d4fa8ada58dbdf712c466c2;p=thirdparty%2Fbind9.git 2670. [bug] Unexpected connect failures failed to log enough information to be useful. [RT #20205] --- diff --git a/CHANGES b/CHANGES index f6d49b4c474..fa03d53f9d8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2670. [bug] Unexpected connect failures failed to log enough + information to be useful. [RT #20205] + 2663. [func] win32: allow named to run as a service using "NT AUTHORITY\LocalService" as the account. [RT #19977] diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 55b0d44bd21..b750b506a70 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.275.10.41 2009/08/13 02:19:18 marka Exp $ */ +/* $Id: socket.c,v 1.275.10.42 2009/09/07 02:14:40 marka Exp $ */ /*! \file */ @@ -4853,6 +4853,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, isc_socketmgr_t *manager; int cc; char strbuf[ISC_STRERRORSIZE]; + char addrbuf[ISC_SOCKADDR_FORMATSIZE]; REQUIRE(VALID_SOCKET(sock)); REQUIRE(addr != NULL); @@ -4921,7 +4922,9 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, sock->connected = 0; isc__strerror(errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, "%d/%s", errno, strbuf); + isc_sockaddr_format(addr, addrbuf, sizeof(addrbuf)); + UNEXPECTED_ERROR(__FILE__, __LINE__, "connect(%s) %d/%s", + addrbuf, errno, strbuf); UNLOCK(&sock->lock); inc_stats(sock->manager->stats,