summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/udp6_usrreq.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/udp6_usrreq.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/udp6_usrreq.c')
-rw-r--r--sys/netinet6/udp6_usrreq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index b91f9b6..33cdb59 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) {
OpenPOWER on IntegriCloud