diff --git a/apps/wolfsshd/wolfsshd.c b/apps/wolfsshd/wolfsshd.c index 8631f4fc8..e994df50a 100644 --- a/apps/wolfsshd/wolfsshd.c +++ b/apps/wolfsshd/wolfsshd.c @@ -2396,8 +2396,13 @@ static int StartSSHD(int argc, char** argv) conn->fd = (int)accept(listenFd, (struct sockaddr*)&clientAddr, &clientAddrSz); if (conn->fd >= 0) { - inet_ntop(AF_INET, &clientAddr.sin_addr, conn->ip, - INET_ADDRSTRLEN); + inet_ntop(AF_INET, +#ifdef TEST_IPV6 + &clientAddr.sin6_addr, +#else + &clientAddr.sin_addr, +#endif /* TEST_IPV6 */ + conn->ip, INET_ADDRSTRLEN); } #endif