SCTP: Provide more info on getaddrinfo() fail

Upon failure, the error message was saying that something failed (i.e.,
the reason), but not parameters of the getaddrinfo(). Simplify root
cause analysis by providing the parameters for the attempted
getaddrinfo() call.
This commit is contained in:
Robert Schmidt
2025-06-06 07:53:58 +02:00
parent 627e60f5bd
commit b7f00aa240
+1 -1
View File
@@ -464,7 +464,7 @@ static void sctp_handle_new_association_req(const instance_t instance,
char port[12];
snprintf(port, sizeof(port), "%d", req->port);
int status = getaddrinfo(remote, port, &hints, &serv);
AssertFatal(status == 0, "getaddrinfo() failed: %s\n", gai_strerror(status));
AssertFatal(status == 0, "getaddrinfo(node %s service %s) failed: %s\n", remote, port, gai_strerror(status));
struct addrinfo *p = NULL;
for (p = serv; p != NULL; p = p->ai_next) {