Patch the nfsd so that it doesn't register with rpcbind for an NFSv4 only
authorrmacklem <rmacklem@FreeBSD.org>
Thu, 8 Dec 2016 23:29:56 +0000 (23:29 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Thu, 8 Dec 2016 23:29:56 +0000 (23:29 +0000)
commitfea344561b9c8cd6458ad949c4abd6d8fb0301a6
tree1ee661d5e9d1ec228097a13a2e67bfa82ba9c9c3
parentbb293382882da082cb5bf33ed446904a16254272
Patch the nfsd so that it doesn't register with rpcbind for an NFSv4 only
server.

This patch uses the sysctl vfs.nfsd.server_min_nfsvers to determine
if/what versions of NFS service should be registered with rpcbind.
For NFSv4 only, it does not register at all, since NFSv4 always uses 2049
and does not require rpcbind.
For NFSv3 minimum, it registers NFSv3 but not NFSv2.

Tested by: jmader2@gmu.edu
Submitted by: jmader2@gmu.edu (earlier version)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8696
usr.sbin/nfsd/nfsd.c