Fixed displaying of IPv6 addresses.

This commit is contained in:
Thomas Pornin 2016-11-12 14:43:05 +01:00
parent f56b0baab3
commit 9dc3c9b61d

View file

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