Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2009 14:56:38 -0700
From:      Chuck Swiger <cswiger@mac.com>
To:        Harti Brandt <harti@freebsd.org>
Cc:        "freebsd-net@freebsd.org Net" <freebsd-net@freebsd.org>
Subject:   Re: TCP bug?
Message-ID:  <670B545A-71FD-4591-B466-96B0B8BA046B@mac.com>
In-Reply-To: <20090619220901.Y970@beagle.kn.op.dlr.de>
References:  <20090619191756.R581@beagle.kn.op.dlr.de> <82A6C509-6141-4226-B145-1DE6801256B1@mac.com> <20090619220901.Y970@beagle.kn.op.dlr.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi--

On Jun 19, 2009, at 1:15 PM, Harti Brandt wrote:
> CS>See figure 12-- I think you should be sending a RST back....
>
> I think this is too drastic. A segment is unacceptable only if it is
> completly out of the window. Here part is in the window.

Well, perhaps you're right that it would be drastic.

I'll agree that the start of the segment falls within the window, at  
least if the window size is greater than 0.  If you decide that the  
incoming segment is "possibly valid", then the conclusion that you  
should move to ESTABLISHED, accept and ACK the data which lies within  
the valid window, and drop/ignore the rest including the FIN seems to  
be a sensible consequence.

Moving to CLOSE_WAIT state is not appropriate until you actually  
accept and process the sequence # which includes that FIN.

> Also conceptually TCP enters the ESTABLISHED state as soon as it  
> finds that the ACK in the
> SYN,ACK is correct before it starts to process the data and the FIN  
> (p.68
> of RFC793 - first you enter ESTABLISHED and ACK, then you goto step  
> 6). So
> taking into account the explanation at top of page 70 (which logically
> belongs to step 6) you just drop everything outside the window -  
> part of
> the data and the FIN in our case - and proceed.
>
> Note, that the data in the SYN,ACK is always partly in the window  
> because
> this segment contains the IRS, except if the window is 0 and the
> segment contains data or FIN.

If the window size is 0, only acks without any data are acceptable,  
but your test case seems to have a non-0 initial window size, so we  
don't need to belabor that point too much.

-- 
-Chuck
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?670B545A-71FD-4591-B466-96B0B8BA046B>