Date: Thu, 29 Nov 2001 15:03:04 +0800 From: "¼B¾JÂ×" <cfliu@realtek.com.tw> To: "Jonathan Lemon" <jlemon@flugsvamp.com> Cc: <freebsd-net@freebsd.org> Subject: Re: Does 4.4 FreeBSD kernel supports TCP simultaneous open? Message-ID: <001701c178a3$e43670e0$a22314ac@RTCN3848> References: <200111290637.fAT6bd213755@prism.flugsvamp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001701c178a3$e43670e0$a22314ac>