From: Thomas Pornin Date: Wed, 7 Jun 2017 22:51:55 +0000 (+0200) Subject: Small fix on sample server code (displaying of IPv6 addresses). X-Git-Tag: v0.5~18 X-Git-Url: https://bearssl.org/gitweb//home/git/?a=commitdiff_plain;h=52cc1a1a18d179e1cfe042b5131ae936d4c10f39;p=BearSSL Small fix on sample server code (displaying of IPv6 addresses). --- diff --git a/samples/server_basic.c b/samples/server_basic.c index 3b4c312..e774c4d 100644 --- a/samples/server_basic.c +++ b/samples/server_basic.c @@ -204,8 +204,8 @@ accept_client(int server_fd) 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; }