In ip6_sprintf no longer use and return one of eight static buffers

for printing/logging ipv6 addresses.
The caller now has to hand in a sufficiently large buffer as first
argument.

This is the "+ one more change" missed in the original commit.

Noticed by:	tinderbox
Pointy hat to:	me (#1)
This commit is contained in:
bz 2006-12-12 17:44:46 +00:00
parent e780f220d8
commit d1e7a81aa4

View File

@ -3605,10 +3605,12 @@ sctp_print_address(struct sockaddr *sa)
if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6;
char ip6buf[INET6_ADDRSTRLEN];
sin6 = (struct sockaddr_in6 *)sa;
printf("IPv6 address: %s:%d scope:%u\n",
ip6_sprintf(&sin6->sin6_addr), ntohs(sin6->sin6_port),
ip6_sprintf(ip6buf, &sin6->sin6_addr),
ntohs(sin6->sin6_port),
sin6->sin6_scope_id);
} else if (sa->sa_family == AF_INET) {
struct sockaddr_in *sin;