Format IPv6 address with brackets.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 24 May 2006 19:42:24 +0000 (19:42 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 24 May 2006 19:42:24 +0000 (19:42 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@611 959494ce-11ee-0310-bf91-de5d638817bd

daemon/net.c

index 641c5a2..866e136 100644 (file)
@@ -1124,7 +1124,7 @@ char *formataddress(struct sockaddr *arg, socklen_t arglen)
        ipv6 = (struct sockaddr_in6 *)arg;
        if(inet_ntop(AF_INET6, &ipv6->sin6_addr, buf, sizeof(buf)) == NULL)
            return(NULL);
-       ret = sprintf2("%s:%i", buf, (int)ntohs(ipv6->sin6_port));
+       ret = sprintf2("[%s]:%i", buf, (int)ntohs(ipv6->sin6_port));
        break;
 #endif
     default: