router_readconfig: remove ipv6 address formatting hack
Since we now properly print addresses, we don't have to do a formatting
hack, which actually adds inconsistency and screws with the statistics
metrics, as well as the duplicate detection.
@@ -768,15 +768,10 @@ router_readconfig(router *orig,
} else if (walk->ai_family == AF_INET6) {
if (inet_ntop(walk->ai_family,
&((struct sockaddr_in6 *)walk->ai_addr)->sin6_addr,
- hnbuf + 1, sizeof(hnbuf) - 2) != NULL)
- {
- hnbuf[0] = '[';
- /* space is reserved above */
- strcat(hnbuf, "]");
+ hnbuf, sizeof(hnbuf)) != NULL)
ip = hnbuf;
}
}
- }
newserver = NULL;
for (s = ret->srvrs; s != NULL; s = s->next) {
