From: Steve Dickson Date: Fri, 7 Jul 2006 23:35:02 +0000 (+1000) Subject: Call nfssvc_versbits before nfssvc_setfds X-Git-Tag: nfs-utils-1-0-9~4 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=b0c3cbfee702c019dab0a22557bbf38e24dfcee1;p=nfs-utils.git Call nfssvc_versbits before nfssvc_setfds nfssvc_versbits() has to be called before nfssvc_setfds() for the version processing to work correctly --- 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)