Skip to content

Commit 5aa970b

Browse files
committed
Fix strace logging of ipv6 port
1 parent 56ca00b commit 5aa970b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/sock/sockdebug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const char *_DescribeSockaddr(char buf[128], const struct sockaddr *sa,
5656
p = stpcpy(p, ip);
5757
*p++ = ']';
5858
*p++ = ':';
59-
p = FormatUint32(p, in6->sin6_port);
59+
p = FormatUint32(p, ntohs(in6->sin6_port));
6060
}
6161
} else if (sa->sa_family == AF_UNIX &&
6262
sasize >= sizeof(struct sockaddr_un)) {

0 commit comments

Comments
 (0)