From nobody@FreeBSD.org  Sat Dec 11 02:13:30 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B1B8A16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 11 Dec 2004 02:13:30 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 80B8543D46
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 11 Dec 2004 02:13:30 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBB2DUnS085691
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 11 Dec 2004 02:13:30 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iBB2DUSs085689;
	Sat, 11 Dec 2004 02:13:30 GMT
	(envelope-from nobody)
Message-Id: <200412110213.iBB2DUSs085689@www.freebsd.org>
Date: Sat, 11 Dec 2004 02:13:30 GMT
From: Qing Li <Qing.Li@bluecoat.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: TCP simultaneous open fails.
X-Send-Pr-Version: www-2.3

>Number:         74935
>Category:       kern
>Synopsis:       [netinet] [patch] TCP simultaneous open fails.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    qingli
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 11 02:20:24 GMT 2004
>Closed-Date:    Mon Sep 18 23:19:52 GMT 2006
>Last-Modified:  Mon Sep 18 23:19:52 GMT 2006
>Originator:     Qing Li
>Release:        FreeBSD 6.0-CURRENT
>Organization:
Blue Coat Systems, Inc.
>Environment:
FreeBSD heavygear.bluecoat.com 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Wed Nov 10 10:44:35 UTC 2004     root@heavygear.bluecoat.com:/usr/obj/usr/src/sys/QING  i386

>Description:
TCP simulataneous open fails and connection cannot be established.

>How-To-Repeat:
Do a TCP simultaneous open using whatever method.
I used ANVL TCP-Core test case 5.25 to verify this problem.

>Fix:
Index: tcp_input.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_input.c,v
retrieving revision 1.261
diff -c -r1.261 tcp_input.c
*** tcp_input.c 28 Nov 2004 11:06:22 -0000      1.261
--- tcp_input.c 11 Dec 2004 02:08:44 -0000
***************
*** 1400,1406 ****
                         *        SYN-SENT* -> SYN-RECEIVED*
                         * If there was no CC option, clear cached CC value.
                         */
!                       tp->t_flags |= TF_ACKNOW;
                        callout_stop(tp->tt_rexmt);
                        tp->t_state = TCPS_SYN_RECEIVED;
                }
--- 1400,1406 ----
                         *        SYN-SENT* -> SYN-RECEIVED*
                         * If there was no CC option, clear cached CC value.
                         */
!                       tp->t_flags |= (TF_ACKNOW | TF_NEEDSYN);
                        callout_stop(tp->tt_rexmt);
                        tp->t_state = TCPS_SYN_RECEIVED;
                }
heavygear# cvs diff -c tcp_output.c
Index: tcp_output.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/tcp_output.c,v
retrieving revision 1.106
diff -c -r1.106 tcp_output.c
*** tcp_output.c        29 Nov 2004 18:47:27 -0000      1.106
--- tcp_output.c        11 Dec 2004 02:09:12 -0000
***************
*** 327,333 ****
         * know that foreign host supports TAO, suppress sending segment.
         */
        if ((flags & TH_SYN) && SEQ_GT(tp->snd_nxt, tp->snd_una)) {
!               flags &= ~TH_SYN;
                off--, len++;
        }

--- 327,334 ----
         * know that foreign host supports TAO, suppress sending segment.
         */
        if ((flags & TH_SYN) && SEQ_GT(tp->snd_nxt, tp->snd_una)) {
!                 if (tp->t_state != TCPS_SYN_RECEIVED)
!                   flags &= ~TH_SYN;
                off--, len++;
        }



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->andre 
Responsible-Changed-By: andre 
Responsible-Changed-When: Mon Dec 13 11:23:00 GMT 2004 
Responsible-Changed-Why:  
Take over. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74935 
Responsible-Changed-From-To: andre->qingli 
Responsible-Changed-By: andre 
Responsible-Changed-When: Sat Feb 18 16:36:37 UTC 2006 
Responsible-Changed-Why:  
Submittor has become committer.  Let him clean up his own PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=74935 
State-Changed-From-To: open->closed 
State-Changed-By: qingli 
State-Changed-When: Mon Sep 18 23:19:12 UTC 2006 
State-Changed-Why:  
The fix has been made in tcp_input.c rev 1.290. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=74935 
>Unformatted:
