]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Call nfssvc_versbits before nfssvc_setfds
authorSteve Dickson <steved@redhat.com>
Fri, 7 Jul 2006 23:35:02 +0000 (09:35 +1000)
committerNeil Brown <neilb@suse.de>
Fri, 7 Jul 2006 23:35:02 +0000 (09:35 +1000)
nfssvc_versbits() has to be called before nfssvc_setfds()
for the version processing to work correctly

support/nfs/nfssvc.c

index a6ea410226f193d5f22def299ff9d9a57914682a..1feffdde3283f57c53bb1ab3f34b8dcd92154fd1 100644 (file)
@@ -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)