From owner-freebsd-net Wed Mar 7 19:52:36 2001 Delivered-To: freebsd-net@freebsd.org Received: from coconut.itojun.org (coconut.itojun.org [210.160.95.97]) by hub.freebsd.org (Postfix) with ESMTP id 48DE337B718 for ; Wed, 7 Mar 2001 19:52:34 -0800 (PST) (envelope-from itojun@itojun.org) Received: from kiwi.itojun.org (localhost.itojun.org [127.0.0.1]) by coconut.itojun.org (8.9.3+3.2W/3.7W/smtpfeed 1.06) with ESMTP id MAA06253; Thu, 8 Mar 2001 12:52:31 +0900 (JST) To: wietse@porcupine.org (Wietse Venema) Cc: Jonathan Lemon , Arjan.deVet@adv.iae.nl, net@freebsd.org, postfix-users@postfix.org In-reply-to: wietse's message of Wed, 07 Mar 2001 16:20:35 EST. <20010307212035.8170EBC070@spike.porcupine.org> X-Template-Reply-To: itojun@itojun.org X-Template-Return-Receipt-To: itojun@itojun.org X-PGP-Fingerprint: F8 24 B4 2C 8C 98 57 FD 90 5F B4 60 79 54 16 E2 Subject: Re: [itojun@iijlab.net: accept(2) behavior with tcp RST right after handshake] From: itojun@iijlab.net Date: Thu, 08 Mar 2001 12:52:31 +0900 Message-ID: <6251.984023551@coconut.itojun.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Several parts of Postfix do: connect() write() close(), where the >close() may happen before the server has accept()ed the connection. >Due to an incompatible change in FreeBSD 4.2-STABLE, this causes >accept() after close() to fail. The already written data is lost. >This is a bad incompatible change. see SUSv2 and XNET 5.2 spec for accept(), and Stevens (unix network programming vol 1 2nd ed) section 5.11. http://www.opengroup.org/onlinepubs/007908799/xns/accept.html 4.3BSD behavior was very wrong (described in Stevens). old freebsd behavior (return 0-length sockaddr) was also wrong, it kills a set of applications including sendmail and BIND910. new freebsd behavior (ECONNABORTED) is at least SUSv2 conformant, and I expect it to be the behavior of other stacks. itojun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message