Date: Mon, 19 Jun 2006 15:49:52 +0200 From: Andre Oppermann <andre@freebsd.org> To: Blue <Susan.Lan@zyxel.com.tw> Cc: freebsd-net@freebsd.org Subject: Re: [freeBSD-6.1RELEASE] wonderings about function tcp_input() Message-ID: <4496AB80.5040306@freebsd.org> In-Reply-To: <449604D0.8090701@zyxel.com.tw> References: <449604D0.8090701@zyxel.com.tw>
index | next in thread | previous in thread | raw e-mail
Blue wrote:
> Hi, all:
>
> I have a question about line 1765 to 1776 in tcp_input():
>
> /*
> * If the ACK bit is off: if in SYN-RECEIVED state or SENDSYN
> * flag is on (half-synchronized state), then queue data for
> * later processing; else drop segment and return.
> */
> if ((thflags & TH_ACK) == 0) {
> if (tp->t_state == TCPS_SYN_RECEIVED ||
> (tp->t_flags & TF_NEEDSYN))
> goto step6;
> else
> goto drop;
> }
>
> My question is: if we are currently in TCPS_SYN_RECEIVED state, why does
> a segment without ACK bother? Why we need to store the segment and
> process it? Without considering T/TCP, the code should be:
>
> if ((thflags & TH_ACK) == 0) {
> goto drop;
> }
This code is dead at the moment since most of T/TCP (RFC1644) was
removed and the SYN_RECEIVED case is no longer handled here but in
tcp_syncache.c.
--
Andre
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4496AB80.5040306>
