summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--support/nfs/nfssvc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/support/nfs/nfssvc.c b/support/nfs/nfssvc.c
index a6ea410..1feffdd 100644
--- a/support/nfs/nfssvc.c
+++ b/support/nfs/nfssvc.c
@@ -135,9 +135,12 @@ nfssvc(int port, int nrservs, unsigned int versbits, unsigned protobits,
struct nfsctl_arg arg;
int fd;
- nfssvc_setfds(port, protobits, haddr);
-
+ /* Note: must set versions before fds so that
+ * the ports get registered with portmap against correct
+ * versions
+ */
nfssvc_versbits(versbits);
+ nfssvc_setfds(port, protobits, haddr);
fd = open(NFSD_THREAD_FILE, O_WRONLY);
if (fd < 0)