From b0c3cbfee702c019dab0a22557bbf38e24dfcee1 Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Sat, 8 Jul 2006 09:35:02 +1000 Subject: [PATCH] Call nfssvc_versbits before nfssvc_setfds nfssvc_versbits() has to be called before nfssvc_setfds() for the version processing to work correctly --- support/nfs/nfssvc.c | 7 +++++-- 1 file 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) -- 2.39.5