From owner-freebsd-net@FreeBSD.ORG Fri Feb 18 00:37:58 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 523AE16A4CE; Fri, 18 Feb 2005 00:37:58 +0000 (GMT) Received: from mail-yellow.research.att.com (mail-dark.research.att.com [192.20.225.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 469FB43D39; Fri, 18 Feb 2005 00:37:57 +0000 (GMT) (envelope-from fenner@research.att.com) Received: from bright.research.att.com (bright.research.att.com [135.207.20.189]) by mail-green.research.att.com (Postfix) with ESMTP id 42D8AA7BCD; Thu, 17 Feb 2005 19:37:56 -0500 (EST) Received: (from fenner@localhost) by bright.research.att.com (8.12.11/8.12.10/Submit) id j1I0bu9F001044; Thu, 17 Feb 2005 16:37:56 -0800 Message-Id: <200502180037.j1I0bu9F001044@bright.research.att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII To: rwatson@freebsd.org Date: Thu, 17 Feb 2005 16:37:56 -0800 From: Bill Fenner Versions: dmail (linux) 2.6d/makemail 2.10 cc: net@freebsd.org Subject: Re: solisten() question: why do we check for completed connections? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2005 00:37:58 -0000 Robert, The code in rev 7.1 (4.3BSD) was: if (so->so_q == 0) { so->so_q = so; so->so_q0 = so; so->so_options |= SO_ACCEPTCONN; } which looks like it's initializing q0 and q to be circular queues, which has to only happen once, and also setting SO_ACCEPTCONN; since nothing ever turns off SO_ACCEPTCONN, this is not something that has to happen only once. When the stuff that had to happen only once got removed, the conditional remained. So, I'd say that setting SO_ACCEPTCONN is required, but the conditional is not. I don't know if that helps your race or not. Bill