Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2007 12:22:15 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, bz@freebsd.org, mjacob@freebsd.org, Warner Losh <imp@bsdimp.com>
Subject:   Re: cvs commit: src/sys/netinet tcp_input.c tcp_usrreq.c
Message-ID:  <86ejiqi42w.fsf@ds4.des.no>
In-Reply-To: <46ADBA68.4080403@freebsd.org> (Andre Oppermann's message of "Mon\, 30 Jul 2007 12\:16\:08 %2B0200")
References:  <20070729214715.I31116@maildrop.int.zabbadoz.net> <20070729160246.A86779@ns1.feral.com> <86zm1ejrat.fsf@ds4.des.no> <20070730.025750.41720145.imp@bsdimp.com> <86k5sijlge.fsf@ds4.des.no> <86r6mqi4wp.fsf@ds4.des.no> <46ADBA68.4080403@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Andre Oppermann <andre@freebsd.org> writes:
> Please don't forget to undo the #ifdef and change of the log function
> in tcp_input.c.

You mean revert 1.365?  Sure, see updated patch.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=tcpstates.diff

Index: sys/netinet/tcp_fsm.h
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_fsm.h,v
retrieving revision 1.19
diff -u -r1.19 tcp_fsm.h
--- sys/netinet/tcp_fsm.h	11 May 2007 10:50:31 -0000	1.19
+++ sys/netinet/tcp_fsm.h	30 Jul 2007 09:08:26 -0000
@@ -102,7 +102,7 @@
 #endif
 
 #ifdef	TCPSTATES
-const char *tcpstates[] = {
+static const char *tcpstates[] = {
 	"CLOSED",	"LISTEN",	"SYN_SENT",	"SYN_RCVD",
 	"ESTABLISHED",	"CLOSE_WAIT",	"FIN_WAIT_1",	"CLOSING",
 	"LAST_ACK",	"FIN_WAIT_2",	"TIME_WAIT",
Index: sys/netinet/tcp_input.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_input.c,v
retrieving revision 1.366
diff -u -r1.366 tcp_input.c
--- sys/netinet/tcp_input.c	29 Jul 2007 01:31:33 -0000	1.366
+++ sys/netinet/tcp_input.c	30 Jul 2007 10:20:30 -0000
@@ -1573,15 +1573,9 @@
 		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);
Index: sys/netinet/tcp_usrreq.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_usrreq.c,v
retrieving revision 1.159
diff -u -r1.159 tcp_usrreq.c
--- sys/netinet/tcp_usrreq.c	29 Jul 2007 01:31:33 -0000	1.159
+++ sys/netinet/tcp_usrreq.c	30 Jul 2007 09:08:19 -0000
@@ -87,10 +87,6 @@
 /*
  * TCP protocol interface to socket abstraction.
  */
-#ifdef	TCPDEBUG
-extern	const char *tcpstates[];
-#endif
-
 static int	tcp_attach(struct socket *);
 static int	tcp_connect(struct tcpcb *, struct sockaddr *,
 		    struct thread *td);
Index: sys/netipx/spx_debug.c
===================================================================
RCS file: /home/ncvs/src/sys/netipx/spx_debug.c,v
retrieving revision 1.18
diff -u -r1.18 spx_debug.c
--- sys/netipx/spx_debug.c	11 May 2007 10:38:34 -0000	1.18
+++ sys/netipx/spx_debug.c	30 Jul 2007 09:19:46 -0000
@@ -69,6 +69,8 @@
 #include <sys/systm.h>
 #include <sys/protosw.h>
 
+#define TCPSTATES		/* for logging */
+
 #include <netinet/in_systm.h>
 #include <netinet/tcp_fsm.h>
 
Index: sys/netipx/spx_debug.h
===================================================================
RCS file: /home/ncvs/src/sys/netipx/spx_debug.h,v
retrieving revision 1.17
diff -u -r1.17 spx_debug.h
--- sys/netipx/spx_debug.h	11 May 2007 10:38:34 -0000	1.17
+++ sys/netipx/spx_debug.h	30 Jul 2007 09:12:44 -0000
@@ -95,7 +95,6 @@
 #ifdef _KERNEL
 extern char *prurequests[];
 extern char *sanames[];
-extern char *tcpstates[];
 
 void	spx_trace(short act, u_char ostate, struct spxpcb *sp, struct spx *si,
 	    int req);
Index: usr.bin/netstat/ipx.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/netstat/ipx.c,v
retrieving revision 1.26
diff -u -r1.26 ipx.c
--- usr.bin/netstat/ipx.c	16 Jul 2007 17:15:54 -0000	1.26
+++ usr.bin/netstat/ipx.c	30 Jul 2007 10:01:24 -0000
@@ -49,6 +49,7 @@
 
 #include <net/route.h>
 
+#define TCPSTATES
 #include <netinet/tcp_fsm.h>
 
 #include <netipx/ipx.h>
@@ -72,8 +73,6 @@
 
 static char *ipx_prpr (struct ipx_addr *);
 
-extern char *tcpstates[];
-
 /*
  * Print a summary of connections related to a Network Systems
  * protocol.  For SPX, also give state of connection.

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ejiqi42w.fsf>