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/udp6_usrreq.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/udp6_usrreq.c')
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index b91f9b698524..33cdb599b847 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -327,13 +327,15 @@ udp6_input(mp, offp, proto) m->m_pkthdr.rcvif); if (in6p == NULL) { if (log_in_vain) { - char buf[INET6_ADDRSTRLEN]; + char ip6bufs[INET6_ADDRSTRLEN]; + char ip6bufd[INET6_ADDRSTRLEN]; - strcpy(buf, ip6_sprintf(&ip6->ip6_dst)); log(LOG_INFO, "Connection attempt to UDP [%s]:%d from [%s]:%d\n", - buf, ntohs(uh->uh_dport), - ip6_sprintf(&ip6->ip6_src), ntohs(uh->uh_sport)); + ip6_sprintf(ip6bufd, &ip6->ip6_dst), + ntohs(uh->uh_dport), + ip6_sprintf(ip6bufs, &ip6->ip6_src), + ntohs(uh->uh_sport)); } udpstat.udps_noport++; if (m->m_flags & M_MCAST) { |