From owner-freebsd-net Wed Nov 28 22:59:51 2001 Delivered-To: freebsd-net@freebsd.org Received: from mail.realtek.com.tw (ms1.realtek.com.tw [203.69.112.3]) by hub.freebsd.org (Postfix) with ESMTP id 3A9DB37B421 for ; Wed, 28 Nov 2001 22:59:48 -0800 (PST) Received: from RTCN3848 ([172.20.35.162]) by mail.realtek.com.tw (Lotus Domino Release 5.0.8) with SMTP id 2001112914551241:14066 ; Thu, 29 Nov 2001 14:55:12 +0800 Message-ID: <001701c178a3$e43670e0$a22314ac@RTCN3848> From: "¼B¾JÂ×" To: "Jonathan Lemon" Cc: References: <200111290637.fAT6bd213755@prism.flugsvamp.com> Subject: Re: Does 4.4 FreeBSD kernel supports TCP simultaneous open? Date: Thu, 29 Nov 2001 15:03:04 +0800 MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-MIMETrack: Itemize by SMTP Server on ms1/Realtek(Release 5.0.8 |June 18, 2001) at 11/29/2001 02:55:12 PM, Serialize by Router on ms1/Realtek(Release 5.0.8 |June 18, 2001) at 11/29/2001 02:57:13 PM, Serialize complete at 11/29/2001 02:57:13 PM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="big5" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thanks...I know where my problem is now...It's indeed a duplicate SYN. By the way, the tcp_input function is so long and large and there are several goto statements which make reading the code even more difficult. Is this intened to be like this? Even with Steven's TCP/IP Vol.2, it took me three whole days to draw a Visio flow chart of this function. Has anybody ever considered of reorganizing this module? David. > No. In this case, there are 3 distinct state transitions: > > A. send SYN. CLOSED -> SYN_SENT > B. recv SYN. SYN_SENT -> SYN_RECEIVED > C. recv ACK. SYN_RECIEVED -> ESTABLISHED > > So dropping a connection when receiving a SYN packet in the SYN_RECEIVED > state is the correct thing to do; this is would be a duplicate SYN. For > a simultaneous open, the peer's SYN is received when the local state is > SYN_SENT. > > The error in your logic above is that in step B, only an ACK is sent to > the peer, the SYN is not retransmitted as well. > -- > Jonathan > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message