TCP reset when the window is closed.

Michiel Boland boland37 at xs4all.nl
Tue Feb 10 07:56:04 PST 2004


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



More information about the freebsd-net mailing list