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
This commit is contained in:
Sean Eric Fagan 2018-11-14 19:06:43 +00:00
parent c6aba52e4f
commit 93840fdef6

View File

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