svn commit: r341171 - stable/11/usr.sbin/mountd

Sean Eric Fagan sef at FreeBSD.org
Thu Nov 29 01:05:23 UTC 2018


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);


More information about the svn-src-all mailing list