summaryrefslogtreecommitdiff
path: root/sbin/unwind
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/unwind')
-rw-r--r--sbin/unwind/frontend.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/unwind/frontend.c b/sbin/unwind/frontend.c
index 422cef78770..ab8dfececa8 100644
--- a/sbin/unwind/frontend.c
+++ b/sbin/unwind/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.8 2019/01/30 12:54:34 benno Exp $ */
+/* $OpenBSD: frontend.c,v 1.9 2019/02/01 13:05:55 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -681,11 +681,11 @@ ip_port(struct sockaddr *sa)
}
if (sa->sa_family == AF_INET6)
- snprintf(buf, sizeof(buf), "[%s]:%d", hbuf,
- ((struct sockaddr_in6 *)sa)->sin6_port);
+ snprintf(buf, sizeof(buf), "[%s]:%d", hbuf, ntohs(
+ ((struct sockaddr_in6 *)sa)->sin6_port));
if (sa->sa_family == AF_INET)
- snprintf(buf, sizeof(buf), "[%s]:%d", hbuf,
- ((struct sockaddr_in *)sa)->sin_port);
+ snprintf(buf, sizeof(buf), "[%s]:%d", hbuf, ntohs(
+ ((struct sockaddr_in *)sa)->sin_port));
return buf;
}