svn commit: r282300 - head/sys/netinet

George V. Neville-Neil gnn at FreeBSD.org
Fri May 1 12:49:04 UTC 2015


Author: gnn
Date: Fri May  1 12:49:03 2015
New Revision: 282300
URL: https://svnweb.freebsd.org/changeset/base/282300

Log:
  Add a state transition call to show that we have entered TIME_WAIT.
  Although this is not important to the rest of the TCP processing
  it is a conveneint way to make the DTrace state-transition probe
  catch this important state change.
  
  MFC after:	1 week

Modified:
  head/sys/netinet/tcp_timewait.c

Modified: head/sys/netinet/tcp_timewait.c
==============================================================================
--- head/sys/netinet/tcp_timewait.c	Fri May  1 12:10:36 2015	(r282299)
+++ head/sys/netinet/tcp_timewait.c	Fri May  1 12:49:03 2015	(r282300)
@@ -251,6 +251,13 @@ tcp_twstart(struct tcpcb *tp)
 		}
 	}
 
+
+	/*
+	 * For use only by DTrace.  We do not reference the state
+	 * after this point so modifying it in place is not a problem.
+	 */
+	tcp_state_change(tp, TCPS_TIME_WAIT);
+
 	tw = uma_zalloc(V_tcptw_zone, M_NOWAIT);
 	if (tw == NULL) {
 		/*


More information about the svn-src-head mailing list