From owner-freebsd-net Tue Feb 13 8:11:25 2001 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id E59F437B491 for ; Tue, 13 Feb 2001 08:11:22 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id LAA30820; Tue, 13 Feb 2001 11:11:16 -0500 (EST) (envelope-from wollman) Date: Tue, 13 Feb 2001 11:11:16 -0500 (EST) From: Garrett Wollman Message-Id: <200102131611.LAA30820@khavrinen.lcs.mit.edu> To: Archie Cobbs Cc: net@FreeBSD.ORG Subject: Re: [itojun@iijlab.net: accept(2) behavior with tcp RST right after handshake] In-Reply-To: <200102130231.SAA72979@curve.dellroad.org> References: <6290.982027182@coconut.itojun.org> <200102130231.SAA72979@curve.dellroad.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > ISTR at one time you would instead get the actual sockaddr of the > just-closed socket, rather than a bogus sockaddr... and that is the > behavior one would expect. As itojun pointed out, accept() used to just block if the socket it thought it was going to give you turned out not to be there at the last moment. This was a killer for applications which expected return from select() to be a reliable indicator of connections waiting. I think the proposed fix is the best one we can get right now. Restructuring the TCP code to handle this case doesn't make a whole lot of sense to me (or apparently to itojun or jlemon either). -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message