diff options
author | dfr <dfr@FreeBSD.org> | 2008-04-06 13:52:17 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2008-04-06 13:52:17 +0000 |
commit | dd48f773da4c87f8123f7cfe8d3f3bd66a69b367 (patch) | |
tree | 98deab994a13d68119ac5ebfc5895106dd9f1ce4 /usr.sbin | |
parent | d1c199f415e2039c9489e2dd652adf508d9ec821 (diff) | |
download | FreeBSD-src-dd48f773da4c87f8123f7cfe8d3f3bd66a69b367.zip FreeBSD-src-dd48f773da4c87f8123f7cfe8d3f3bd66a69b367.tar.gz |
Call listen(2) on bound tcp sockets before passing them to svc_tli_create.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpc.lockd/lockd.c | 3 | ||||
-rw-r--r-- | usr.sbin/rpc.statd/statd.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/rpc.lockd/lockd.c b/usr.sbin/rpc.lockd/lockd.c index 002d6ad..f1e9d2d 100644 --- a/usr.sbin/rpc.lockd/lockd.c +++ b/usr.sbin/rpc.lockd/lockd.c @@ -519,6 +519,9 @@ create_service(struct netconfig *nconf) exit(1); } + if (nconf->nc_semantics != NC_TPI_CLTS) + listen(fd, SOMAXCONN); + transp = svc_tli_create(fd, nconf, NULL, RPC_MAXDATASIZE, RPC_MAXDATASIZE); diff --git a/usr.sbin/rpc.statd/statd.c b/usr.sbin/rpc.statd/statd.c index c942338..f51bea8 100644 --- a/usr.sbin/rpc.statd/statd.c +++ b/usr.sbin/rpc.statd/statd.c @@ -367,6 +367,9 @@ create_service(struct netconfig *nconf) exit(1); } + if (nconf->nc_semantics != NC_TPI_CLTS) + listen(sock, SOMAXCONN); + transp = svc_tli_create(fd, nconf, NULL, RPC_MAXDATASIZE, RPC_MAXDATASIZE); |