aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mountd
diff options
context:
space:
mode:
authorSean Eric Fagan <sef@FreeBSD.org>2018-11-14 19:06:43 +0000
committerSean Eric Fagan <sef@FreeBSD.org>2018-11-14 19:06:43 +0000
commit93840fdef625ed5e77c24abcf9481709a045b56c (patch)
tree6607c551bb9db4c38a5d5fb83391d1760d15d17e /usr.sbin/mountd
parentc6aba52e4f8dbead892a270a88639850ca4cee3d (diff)
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
Notes
Notes: svn path=/head/; revision=340442
Diffstat (limited to 'usr.sbin/mountd')
-rw-r--r--usr.sbin/mountd/mountd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 6a7ec43ec5ad..1a10e9dc1c60 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -908,8 +908,12 @@ complete_service(struct netconfig *nconf, char *port_str)
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);