summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-04-27 18:19:12 +0000
committerache <ache@FreeBSD.org>1996-04-27 18:19:12 +0000
commit8a5de28c053b2c80cc2ba69536bf073ffc6c07d0 (patch)
tree0933c6e88bae06cd24ded3a802e0f22cf4064bf5 /sys/netinet/tcp_input.c
parent9c10d8e8d1ef9d87ac73dc6a79e60d0e25079d5a (diff)
downloadFreeBSD-src-8a5de28c053b2c80cc2ba69536bf073ffc6c07d0.zip
FreeBSD-src-8a5de28c053b2c80cc2ba69536bf073ffc6c07d0.tar.gz
inet_ntoa buffer was evaluated twice in log_in_vain, fix it.
Thanx to: jdp
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 9132b33..17cfd32 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
- * $Id: tcp_input.c,v 1.42 1996/04/09 07:01:51 pst Exp $
+ * $Id: tcp_input.c,v 1.43 1996/04/26 18:32:57 wollman Exp $
*/
#ifndef TUBA_INCLUDE
@@ -377,11 +377,15 @@ findpcb:
* but should either do a listen or a connect soon.
*/
if (inp == NULL) {
- if (log_in_vain && tiflags & TH_SYN)
+ if (log_in_vain && tiflags & TH_SYN) {
+ char buf[4*sizeof "123"];
+
+ strcpy(buf, inet_ntoa(ti->ti_dst));
log(LOG_INFO, "Connection attempt to TCP %s:%d"
" from %s:%d\n",
- inet_ntoa(ti->ti_dst), ntohs(ti->ti_dport),
+ buf, ntohs(ti->ti_dport),
inet_ntoa(ti->ti_src), ntohs(ti->ti_sport));
+ }
goto dropwithreset;
}
tp = intotcpcb(inp);
OpenPOWER on IntegriCloud