Skip to content

Commit 11f0b22

Browse files
authored
Merge pull request #701 from anhu/ipv6_fix
Fix compile error triggered by enabling TEST_IPV6
2 parents e483578 + 17a9ff4 commit 11f0b22

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

apps/wolfsshd/wolfsshd.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,8 +2396,13 @@ static int StartSSHD(int argc, char** argv)
23962396
conn->fd = (int)accept(listenFd, (struct sockaddr*)&clientAddr,
23972397
&clientAddrSz);
23982398
if (conn->fd >= 0) {
2399-
inet_ntop(AF_INET, &clientAddr.sin_addr, conn->ip,
2400-
INET_ADDRSTRLEN);
2399+
inet_ntop(AF_INET,
2400+
#ifdef TEST_IPV6
2401+
&clientAddr.sin6_addr,
2402+
#else
2403+
&clientAddr.sin_addr,
2404+
#endif /* TEST_IPV6 */
2405+
conn->ip, INET_ADDRSTRLEN);
24012406
}
24022407
#endif
24032408

0 commit comments

Comments
 (0)