From: Michał Kępień Date: Wed, 2 Dec 2020 21:36:23 +0000 (+0100) Subject: Extend log message for unexpected socket() errors X-Git-Tag: v9.17.8~12^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc2e1dea864b89f8dbf6365b395d6d0e292e9888;p=thirdparty%2Fbind9.git Extend log message for unexpected socket() errors Make sure the error code is included in the message logged for unexpected socket creation errors in order to facilitate troubleshooting on Windows. --- diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 9feae4f8a48..0a3266c48ce 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -2053,8 +2053,10 @@ isc__nm_socket(int domain, int type, int protocol, uv_os_sock_t *sockp) { return (ISC_R_FAMILYNOSUPPORT); default: strerror_r(socket_errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "socket() failed: %s", strbuf); + UNEXPECTED_ERROR( + __FILE__, __LINE__, + "socket() failed with error code %lu: %s", + socket_errno, strbuf); return (ISC_R_UNEXPECTED); } }