From f00543eeab436bcecceeeb194f7f952764bce199 Mon Sep 17 00:00:00 2001 From: "George V. Neville-Neil" Date: Fri, 1 May 2015 12:49:03 +0000 Subject: [PATCH] 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 --- sys/netinet/tcp_timewait.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index da4861521755..1ba74d86ae68 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -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) { /*