summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/tcp_input.c6
-rw-r--r--sys/netinet/tcp_usrreq.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 42d8147..711251e 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1573,9 +1573,15 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
KASSERT(headlocked, ("%s: trimthenstep6: tcp_close.3: head "
"not locked", __func__));
if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) {
+#ifdef TCPDEBUG
log(LOG_DEBUG, "%s; %s: %s: Received data after socket "
"was closed, sending RST and removing tcpcb\n",
s, __func__, tcpstates[tp->t_state]);
+#else
+ log(LOG_DEBUG, "%s; %s: Received data after socket "
+ "was closed, sending RST and removing tcpcb\n",
+ s, __func__);
+#endif
free(s, M_TCPLOG);
}
tp = tcp_close(tp);
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 91c56be..2ecbc30 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -87,7 +87,9 @@
/*
* TCP protocol interface to socket abstraction.
*/
-extern char *tcpstates[]; /* XXX ??? */
+#ifdef TCPDEBUG
+extern const char *tcpstates[];
+#endif
static int tcp_attach(struct socket *);
static int tcp_connect(struct tcpcb *, struct sockaddr *,
OpenPOWER on IntegriCloud