2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

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.
This commit is contained in:
Michał Kępień
2020-12-02 22:36:23 +01:00
parent d7f2db0e91
commit dc2e1dea86

View File

@@ -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);
}
}