Date: Thu, 19 Jun 2008 23:02:34 GMT From: Rui Paulo <rpaulo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 143792 for review Message-ID: <200806192302.m5JN2Y4B086241@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=143792 Change 143792 by rpaulo@rpaulo_epsilon on 2008/06/19 23:02:10 Oops, add the CLOSING case. Affected files ... .. //depot/projects/soc2008/rpaulo-tcpad/handler.c#9 edit Differences ... ==== //depot/projects/soc2008/rpaulo-tcpad/handler.c#9 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#8 $ + * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#9 $ */ #include <stdio.h> @@ -146,7 +146,8 @@ cp->tcpstate = TCPS_CLOSE_WAIT; rcp->tcpstate = TCPS_FIN_WAIT_2; } - if (cp->tcpstate == TCPS_LAST_ACK) { + if (cp->tcpstate == TCPS_LAST_ACK || + cp->tcpstate == TCPS_CLOSING) { cp->tcpstate = TCPS_TIME_WAIT; printf("connection down\n"); } @@ -166,6 +167,9 @@ cp->tcpstate = TCPS_TIME_WAIT; rcp->tcpstate = TCPS_LAST_ACK; } + if (cp->tcpstate == TCPS_FIN_WAIT_1) { + cp->tcpstate = TCPS_CLOSING; + } } else if ((tcp->th_flags & TH_FLAGS) == (TH_RST|TH_ACK)) { if (rcp && rcp->tcpstate == TCPS_SYN_SENT) { DPRINTF("stopped tracking connection (rst) between"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806192302.m5JN2Y4B086241>