From owner-svn-src-stable@FreeBSD.ORG Wed Feb 6 14:12:14 2013 Return-Path: Delivered-To: svn-src-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4A6DD62C; Wed, 6 Feb 2013 14:12:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id E0E0CD6C; Wed, 6 Feb 2013 14:12:13 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.6/8.14.6) with ESMTP id r16ECDYw010769; Wed, 6 Feb 2013 07:12:13 -0700 (MST) (envelope-from ian@FreeBSD.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r16EC13g033243; Wed, 6 Feb 2013 07:12:01 -0700 (MST) (envelope-from ian@FreeBSD.org) Subject: Re: svn commit: r246402 - stable/9/usr.sbin/inetd From: Ian Lepore To: Andrey Zonov In-Reply-To: <201302061316.r16DGh6m024337@svn.freebsd.org> References: <201302061316.r16DGh6m024337@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Wed, 06 Feb 2013 07:12:00 -0700 Message-ID: <1360159920.93359.594.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 14:12:14 -0000 On Wed, 2013-02-06 at 13:16 +0000, Andrey Zonov wrote: > Author: zont > Date: Wed Feb 6 13:16:43 2013 > New Revision: 246402 > URL: http://svnweb.freebsd.org/changeset/base/246402 > > Log: > MFC r245696: > - Force inetd to have listen queue size to be set to the value of > kern.ipc.somaxconn instead of hardcoded value 64. > > Modified: > stable/9/usr.sbin/inetd/inetd.c > Directory Properties: > stable/9/usr.sbin/inetd/ (props changed) > > Modified: stable/9/usr.sbin/inetd/inetd.c > ============================================================================== > --- stable/9/usr.sbin/inetd/inetd.c Wed Feb 6 13:14:30 2013 (r246401) > +++ stable/9/usr.sbin/inetd/inetd.c Wed Feb 6 13:16:43 2013 (r246402) > @@ -1387,7 +1387,7 @@ setsockopt(fd, SOL_SOCKET, opt, (char *) > } > } > if (sep->se_socktype == SOCK_STREAM) > - listen(sep->se_fd, 64); > + listen(sep->se_fd, -1); > enable(sep); > if (debug) { > warnx("registered %s on %d", I recently discovered that the posix documentation for listen(2) states that a queue depth less than zero is to be treated as if zero were specified, and the behavior for zero is to minimize the length of the queue to the smallest value the implementation supports (with words that imply the desired (but not required) effect is to stop listening if possible). Given that, perhaps it's unwise to expand the amount of code we've got that relies on this freebsd-specific non-conformance? -- Ian