From owner-freebsd-net Thu Mar 8 8: 1:50 2001 Delivered-To: freebsd-net@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id 0F7C337B71E for ; Thu, 8 Mar 2001 08:01:43 -0800 (PST) (envelope-from jlemon@flugsvamp.com) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f28Fvx977665; Thu, 8 Mar 2001 09:57:59 -0600 (CST) (envelope-from jlemon) Date: Thu, 8 Mar 2001 09:57:59 -0600 From: Jonathan Lemon To: Wietse Venema Cc: Jonathan Lemon , itojun@iijlab.net, Arjan.deVet@adv.iae.nl, net@freebsd.org, postfix-users@postfix.org Subject: Re: [itojun@iijlab.net: accept(2) behavior with tcp RST right after handshake] Message-ID: <20010308095759.S41963@prism.flugsvamp.com> References: <20010307220605.Q41963@prism.flugsvamp.com> <20010308153817.25296BC06D@spike.porcupine.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20010308153817.25296BC06D@spike.porcupine.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, Mar 08, 2001 at 10:38:17AM -0500, Wietse Venema wrote: > If the result of connect() write() close() depends on whether > accept() happens after or before close(), then the behavior is > broken. The client has received a successful return from write() > and close(). The system is not supposed to lose the data, period. What you seem to be missing here is that the behavior described above is ONLY specific to UNIX-DOMAIN sockets. The description above is generally (but not always) true for the TCP/IP protocol. Data CAN be lost if the TCP connection is RST. It has nothing to do with the ordering of accept() with respect to close(). -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message