summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenaas <venaas>2008-02-21 14:38:39 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-02-21 14:38:39 +0000
commit6e39f3302751a845c390695cf15c5639da9bbd19 (patch)
tree3f52ad4a8db0c0831bb6221613c56962cd980028
parent7d42cd4cbf8f2df017a629d2c272307f254dcc94 (diff)
Solaris9 fix
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/branches/release-1.1@215 e88ac4ed-0b26-0410-9574-a7f39faa03bf
-rw-r--r--util.c2
1 files changed, 2 insertions, 0 deletions
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");