From owner-freebsd-hackers Thu Dec 14 9:44:23 2000 From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 09:44:21 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by hub.freebsd.org (Postfix) with SMTP id 9BE5237B400 for ; Thu, 14 Dec 2000 09:44:19 -0800 (PST) Received: (qmail 4894 invoked from network); 14 Dec 2000 17:44:17 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by karon.sto.dynas.se with SMTP; 14 Dec 2000 17:44:17 -0000 Received: (qmail 29228 invoked by uid 1125); 14 Dec 2000 17:44:22 -0000 Date: Thu, 14 Dec 2000 09:44:15 -0800 (PST) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= X-Sender: mikko@dynas.se To: David Malone Cc: freebsd-hackers@freebsd.org Subject: Re: Rejecting a connection: is accept(2) correct? In-Reply-To: <20001214173605.A53698@walton.maths.tcd.ie> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Reply-To: mikko@dynas.se X-MIME-Autoconverted: to 8bit by snemail 0.35 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 14 Dec 2000, David Malone wrote: > On Thu, Dec 14, 2000 at 09:12:18AM -0800, Mikko Työläjärvi wrote: > > > Is this really true? A quick experiment with recvmsg() seems to > > indicate it is not, at least not for TCP sockets. > > I think this applies after you have accepted the connection. You > can call getpeername() to choose what to do about the call. You > can immediately close the connection if you don't want to deal with > it. Umm.. yes, that is the normal way of doing things, but that is not what (I think) it says in the man-page, which is why I was wondering. "One can obtain user connection request data without confirming the connection..." (and then goes on about recvmsg(),sendmsg() and {set,get}sockept() with little or no details). It does not state which socket this is supposed to operate on: the listening socket, or the new one. If it is the listening socket, it would be an innovation, and open up assorted new possibilities. If it is the new socket, it is old news :-) /Mikko Mikko Työläjärvi_______________________________________mikko@rsasecurity.com RSA Security To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message