diff options
author | bz <bz@FreeBSD.org> | 2006-12-12 12:17:58 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2006-12-12 12:17:58 +0000 |
commit | 297206ec2ac5b34686aaf531476b1b737df9bbd7 (patch) | |
tree | 262eb78fb028423e6796d76401691a45b39b496a /sys/netinet/tcp_hostcache.c | |
parent | dc3e4a0741ba505defdc796a954461de7aa856e3 (diff) | |
download | FreeBSD-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/netinet/tcp_hostcache.c')
-rw-r--r-- | sys/netinet/tcp_hostcache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index 7535d31..f4c7a68 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -587,6 +587,9 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) char *p, *buf; int len, i, error; struct hc_metrics *hc_entry; +#ifdef INET6 + char ip6buf[INET6_ADDRSTRLEN]; +#endif bufsize = linesize * (tcp_hostcache.cache_count + 1); @@ -607,7 +610,7 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) "%4lu %4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : #ifdef INET6 - ip6_sprintf(&hc_entry->ip6), + ip6_sprintf(ip6buf, &hc_entry->ip6), #else "IPv6?", #endif |