From owner-freebsd-net@FreeBSD.ORG Tue Feb 10 07:56:04 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B57B316A4D8 for ; Tue, 10 Feb 2004 07:56:04 -0800 (PST) Received: from smtp-out3.xs4all.nl (smtp-out3.xs4all.nl [194.109.24.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40A1F43D2F for ; Tue, 10 Feb 2004 07:56:04 -0800 (PST) (envelope-from boland37@xs4all.nl) Received: from xs2.xs4all.nl (xs2.xs4all.nl [194.109.21.3]) by smtp-out3.xs4all.nl (8.12.10/8.12.10) with ESMTP id i1AFtwTL098678 for ; Tue, 10 Feb 2004 16:56:03 +0100 (CET) Received: from xs2.xs4all.nl (boland37@localhost.xs4all.nl [127.0.0.1]) by xs2.xs4all.nl (8.12.10/8.12.9) with ESMTP id i1AFsgTN081758 for ; Tue, 10 Feb 2004 16:54:42 +0100 (CET) (envelope-from boland37@xs4all.nl) Received: from localhost (boland37@localhost) by xs2.xs4all.nl (8.12.10/8.12.9/Submit) with ESMTP id i1AFsg4m081755 for ; Tue, 10 Feb 2004 16:54:42 +0100 (CET) (envelope-from boland37@xs2.xs4all.nl) Date: Tue, 10 Feb 2004 16:54:42 +0100 (CET) From: Michiel Boland To: freebsd-net@freebsd.org Message-ID: <20040210164418.B80706-100000@xs2.xs4all.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: TCP reset when the window is closed. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2004 15:56:04 -0000 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