[ECOS] Re: SYN problem with new TCP/IP stack

Grant Edwards grante@visi.com
Sat Feb 4 04:43:00 GMT 2006


On 2006-02-04, Grant Edwards <grante@visi.com> wrote:

> After switching from the "old" TCP/IP stack to the "new" one,
> we've run into a problem which is causing customers to
> complain.  
>
> Here's the scenario:
>
>  1) Host opens TCP connection to eCos application.
>
>  2) Somebody pushes the reset button on the host.
>
>  3) The host reboots and attempts to open a TCP connection to
>     the eCos application _using_the_same_source_port_ (and the 
>     same destination port).[1]
>
> 4a) When the _old_ stack received a SYN for an already-open
>     connection, it sent an ACK with the sequence number from
>     the old connection.  The host saw this and sent a RST
>     (which drops the connection), then attempted to re-open the
>     connection (which succeeded).  All was good.
>
> 4b) When the _new_ stack receives a SYN for an already-open
>     connection, it just ignores it.  So, after a timeout of a
>     minute or so, the host sends it again.  Again it's ignored.
>     This goes on for 10-15 minutes at which point the eCos
>     stack times out the connection and closes it.  Only then
>     can the host open a new connection.

According to my reading of RFC793, page 34 describes this
scenario exactly and requires the behavior of the old network
stack.

According to the sample implimentation on pages 58 though 84,
when you receive a SYN in the ESTABLISHED state you either

  1) Send a RST if the sequence number is inside the current
     receive window window (p71).

  2) Send an ACK if the sequence number is outside the current
     receive window (p69,71).

-- 
Grant Edwards                   grante             Yow!  I OWN six pink
                                  at               HIPPOS!!
                               visi.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list