From: Thomas Pornin Date: Sat, 12 Nov 2016 13:43:05 +0000 (+0100) Subject: Fixed displaying of IPv6 addresses. X-Git-Tag: v0.4~61 X-Git-Url: https://bearssl.org/gitweb//home/git/?a=commitdiff_plain;h=9dc3c9b61d0e8446ff8b8b7a873bbdc3f1c033fe;p=BearSSL Fixed displaying of IPv6 addresses. --- diff --git a/tools/server.c b/tools/server.c index 89d529b..a631982 100644 --- a/tools/server.c +++ b/tools/server.c @@ -161,8 +161,8 @@ accept_client(int server_fd, int verbose) tmp, sizeof tmp); break; case AF_INET6: - name = inet_ntop(AF_INET, - &((struct sockaddr_in *)&sa)->sin_addr, + name = inet_ntop(AF_INET6, + &((struct sockaddr_in6 *)&sa)->sin6_addr, tmp, sizeof tmp); break; }