X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fnfssvc.c;h=1feffdde3283f57c53bb1ab3f34b8dcd92154fd1;hp=a6ea410226f193d5f22def299ff9d9a57914682a;hb=b0c3cbfee702c019dab0a22557bbf38e24dfcee1;hpb=26fff911b21943f20e3937ae3f2d29a1572d2309 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)