svn commit: r340442 - head/usr.sbin/mountd

Sean Eric Fagan sef at FreeBSD.org
Wed Nov 14 19:06:45 UTC 2018


Author: sef
Date: Wed Nov 14 19:06:43 2018
New Revision: 340442
URL: https://svnweb.freebsd.org/changeset/base/340442

Log:
  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
  MFC after:	2 weeks
  Sponsored by:	iXsystems Inc

Modified:
  head/usr.sbin/mountd/mountd.c

Modified: head/usr.sbin/mountd/mountd.c
==============================================================================
--- head/usr.sbin/mountd/mountd.c	Wed Nov 14 18:45:33 2018	(r340441)
+++ head/usr.sbin/mountd/mountd.c	Wed Nov 14 19:06:43 2018	(r340442)
@@ -908,8 +908,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