Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2004 16:54:42 +0100 (CET)
From:      Michiel Boland <boland37@xs4all.nl>
To:        freebsd-net@freebsd.org
Subject:   TCP reset when the window is closed.
Message-ID:  <20040210164418.B80706-100000@xs2.xs4all.nl>

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

Imagine the following situation: two programs set up a TCP connection
between each other and then each starts send()ing data over it without
calling recv(). After a short while the receive windowss at both ends
close.

Now suppose that one of the two programs crashes or exits. The TCP at the
other end will then receive a RST after the next window probe, or whenever
it sends anything. But as far as I can see this RST is never passed on to
the application because the window is closed. Therefore the other
appliction will hang forever. (Unless it has some kind of application
timeout.)

In src/sys/netinet/tcp_input.c there is a check whether the sequence
number is correct for packets with RST set.  But that check does include
cases where zero-sized segments are received with SEG.SEQ = RCV.NXT. These
are allowed by RFC793 (page 26).

Am I overlooking something here?

Cheers
Michiel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040210164418.B80706-100000>