We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e483578 + 17a9ff4 commit 11f0b22Copy full SHA for 11f0b22
1 file changed
apps/wolfsshd/wolfsshd.c
@@ -2396,8 +2396,13 @@ static int StartSSHD(int argc, char** argv)
2396
conn->fd = (int)accept(listenFd, (struct sockaddr*)&clientAddr,
2397
&clientAddrSz);
2398
if (conn->fd >= 0) {
2399
- inet_ntop(AF_INET, &clientAddr.sin_addr, conn->ip,
2400
- INET_ADDRSTRLEN);
+ inet_ntop(AF_INET,
+#ifdef TEST_IPV6
2401
+ &clientAddr.sin6_addr,
2402
+#else
2403
+ &clientAddr.sin_addr,
2404
+#endif /* TEST_IPV6 */
2405
+ conn->ip, INET_ADDRSTRLEN);
2406
}
2407
#endif
2408
0 commit comments