Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2018 01:05:22 +0000 (UTC)
From:      Sean Eric Fagan <sef@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r341171 - stable/11/usr.sbin/mountd
Message-ID:  <201811290105.wAT15MR6050610@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sef
Date: Thu Nov 29 01:05:21 2018
New Revision: 341171
URL: https://svnweb.freebsd.org/changeset/base/341171

Log:
  MFC r340442
  
  mountd has no way to configure the listen queue depth; rather than add a new
  option, we pass -1 down to listen, which causes it to use the
  kern.ipc.soacceptqueue sysctl.
  
  Approved by:	mav
  Sponsored by:	iXsystems Inc

Modified:
  stable/11/usr.sbin/mountd/mountd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/mountd/mountd.c
==============================================================================
--- stable/11/usr.sbin/mountd/mountd.c	Thu Nov 29 01:04:24 2018	(r341170)
+++ stable/11/usr.sbin/mountd/mountd.c	Thu Nov 29 01:05:21 2018	(r341171)
@@ -906,8 +906,12 @@ complete_service(struct netconfig *nconf, char *port_s
 		if (fd < 0)
 			continue;
 
+		/*
+		 * Using -1 tells listen(2) to use
+		 * kern.ipc.soacceptqueue for the backlog.
+		 */
 		if (nconf->nc_semantics != NC_TPI_CLTS)
-			listen(fd, SOMAXCONN);
+			listen(fd, -1);
 
 		if (nconf->nc_semantics == NC_TPI_CLTS )
 			transp = svc_dg_create(fd, 0, 0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811290105.wAT15MR6050610>