From 5aa970bc4e2b4cef43b5838918fc5ec046654756 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Mon, 16 Sep 2024 02:19:17 -0700 Subject: [PATCH] Fix strace logging of ipv6 port --- libc/sock/sockdebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/sock/sockdebug.c b/libc/sock/sockdebug.c index cb2631e04..dbdb3e094 100644 --- a/libc/sock/sockdebug.c +++ b/libc/sock/sockdebug.c @@ -56,7 +56,7 @@ const char *_DescribeSockaddr(char buf[128], const struct sockaddr *sa, p = stpcpy(p, ip); *p++ = ']'; *p++ = ':'; - p = FormatUint32(p, in6->sin6_port); + p = FormatUint32(p, ntohs(in6->sin6_port)); } } else if (sa->sa_family == AF_UNIX && sasize >= sizeof(struct sockaddr_un)) {