From e0f99a4199ade6ca2d2325d1d38a45e4ce403fa1 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 9 Aug 2014 06:14:53 +0200 Subject: log: fix port of IPv6 addresses with hidden IP addresses --- src/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index 8809387..8513c79 100644 --- a/src/log.c +++ b/src/log.c @@ -72,7 +72,7 @@ static size_t snprint_peer_address(char *buffer, size_t size, const fastd_peer_a case AF_INET6: if (!bind_address && conf.hide_ip_addresses) - return snprintf_safe(buffer, size, "[hidden]:%u", ntohs(address->in.sin_port)); + return snprintf_safe(buffer, size, "[hidden]:%u", ntohs(address->in6.sin6_port)); if (inet_ntop(AF_INET6, &address->in6.sin6_addr, addr_buf, sizeof(addr_buf))) { char ifname_buf[IF_NAMESIZE]; if (!iface && IN6_IS_ADDR_LINKLOCAL(&address->in6.sin6_addr)) -- cgit v1.2.3