summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/scope6.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2006-12-12 12:17:58 +0000
committerbz <bz@FreeBSD.org>2006-12-12 12:17:58 +0000
commit297206ec2ac5b34686aaf531476b1b737df9bbd7 (patch)
tree262eb78fb028423e6796d76401691a45b39b496a /sys/netinet6/scope6.c
parentdc3e4a0741ba505defdc796a954461de7aa856e3 (diff)
downloadFreeBSD-src-297206ec2ac5b34686aaf531476b1b737df9bbd7.zip
FreeBSD-src-297206ec2ac5b34686aaf531476b1b737df9bbd7.tar.gz
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.
Diffstat (limited to 'sys/netinet6/scope6.c')
-rw-r--r--sys/netinet6/scope6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index 0594f905..06ef215 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) ||
OpenPOWER on IntegriCloud