From 6e39f3302751a845c390695cf15c5639da9bbd19 Mon Sep 17 00:00:00 2001 From: venaas Date: Thu, 21 Feb 2008 14:38:39 +0000 Subject: Solaris9 fix git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@215 e88ac4ed-0b26-0410-9574-a7f39faa03bf --- util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util.c b/util.c index 2a9c7f4..f714863 100644 --- a/util.c +++ b/util.c @@ -88,6 +88,8 @@ char *addr2string(struct sockaddr *addr, socklen_t len) { addr = (struct sockaddr *)&sa4; } } + len = addr->sa_family == AF_INET ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); + if (getnameinfo(addr, len, addr_buf[i], sizeof(addr_buf[i]), NULL, 0, NI_NUMERICHOST)) { debug(DBG_WARN, "getnameinfo failed"); -- cgit v1.1