From owner-freebsd-net Mon Feb 12 18:31:37 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by hub.freebsd.org (Postfix) with ESMTP id 5281237B4EC for ; Mon, 12 Feb 2001 18:31:35 -0800 (PST) Received: from curve.dellroad.org (curve.dellroad.org [10.1.1.30]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id SAA93059; Mon, 12 Feb 2001 18:31:34 -0800 (PST) Received: (from archie@localhost) by curve.dellroad.org (8.9.3/8.9.3) id SAA72979; Mon, 12 Feb 2001 18:31:33 -0800 (PST) (envelope-from archie) From: Archie Cobbs Message-Id: <200102130231.SAA72979@curve.dellroad.org> Subject: Re: [itojun@iijlab.net: accept(2) behavior with tcp RST right after handshake] In-Reply-To: <6290.982027182@coconut.itojun.org> "from itojun@iijlab.net at Feb 13, 2001 10:19:42 am" To: itojun@iijlab.net Date: Mon, 12 Feb 2001 18:31:33 -0800 (PST) Cc: jlemon@flugsvamp.com, kris@obsecurity.org, net@freebsd.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org itojun@iijlab.net writes: > >And what do you mean by ``most apps already do the wrong thing now''? > > for background (like when this happens) see previous articles > on this thread. > > current behavior: return 0-length sockaddr. Yeah, that is totally broken. Hmm.. how long has this been the "current behavior" ? 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. > new behavior: return ECONNABORTED. > SUSv2 suggests this behavior. it is much safer as accept(2) will fail > so almost every application will go to error case (if you don't have > error check in userland appication, that's problem in application). Why does SUSv2 suggest this when so many applications would break? And they work fine doing the old behavior (returning a real sockaddr)? -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message