diff options
author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2006-12-12 12:17:58 +0000 |
---|---|---|
committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2006-12-12 12:17:58 +0000 |
commit | 1d54aa3ba94f4d9883b0746ce45123d5b5be773b (patch) | |
tree | 262eb78fb028423e6796d76401691a45b39b496a /sys/netinet6/scope6.c | |
parent | 558c08c358c16c8a2ddadc3ac03935fce0b2e895 (diff) | |
download | src-1d54aa3ba94f4d9883b0746ce45123d5b5be773b.tar.gz src-1d54aa3ba94f4d9883b0746ce45123d5b5be773b.zip |
MFp4: 92972, 98913 + one more change
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.
Notes
Notes:
svn path=/head/; revision=165118
Diffstat (limited to 'sys/netinet6/scope6.c')
-rw-r--r-- | sys/netinet6/scope6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index 0594f905a81a..06ef215db4a4 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -369,12 +369,13 @@ int sa6_recoverscope(sin6) struct sockaddr_in6 *sin6; { + char ip6buf[INET6_ADDRSTRLEN]; u_int32_t zoneid; if (sin6->sin6_scope_id != 0) { log(LOG_NOTICE, "sa6_recoverscope: assumption failure (non 0 ID): %s%%%d\n", - ip6_sprintf(&sin6->sin6_addr), sin6->sin6_scope_id); + ip6_sprintf(ip6buf, &sin6->sin6_addr), sin6->sin6_scope_id); /* XXX: proceed anyway... */ } if (IN6_IS_SCOPE_LINKLOCAL(&sin6->sin6_addr) || |