From owner-cvs-all@FreeBSD.ORG Fri Feb 25 17:52:12 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E527516A4CE; Fri, 25 Feb 2005 17:52:12 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAECC43D64; Fri, 25 Feb 2005 17:52:12 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1PHqCxo091994; Fri, 25 Feb 2005 17:52:12 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1PHqC9M091993; Fri, 25 Feb 2005 17:52:12 GMT (envelope-from rwatson) Message-Id: <200502251752.j1PHqC9M091993@repoman.freebsd.org> From: Robert Watson Date: Fri, 25 Feb 2005 17:52:12 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sys/kern uipc_socket.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 17:52:13 -0000 rwatson 2005-02-25 17:52:12 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/kern uipc_socket.c Log: Merge uipc_socket.c:1.227 from HEAD to RELENG_5: date: 2005/02/18 00:52:17; author: rwatson; state: Exp; lines: +4 -6 In solisten(), unconditionally set the SO_ACCEPTCONN option in so->so_options when solisten() will succeed, rather than setting it conditionally based on there not being queued sockets in the completed socket queue. Otherwise, if the protocol exposes new sockets via the completed queue before solisten() completes, the listen() system call will succeed, but the socket and protocol state will be out of sync. For TCP, this didn't happen in practice, as the TCP code will panic if a new connection comes in after the tcpcb has been transitioned to a listening state but the socket doesn't have SO_ACCEPTCONN set. This is historical behavior resulting from bitrot since 4.3BSD, in which that line of code was associated with the conditional NULL'ing of the connection queue pointers (one-time initialization to be performed during the transition to a listening socket), which are now initialized separately. Discussed with: fenner, gnn Revision Changes Path 1.208.2.14 +4 -6 src/sys/kern/uipc_socket.c