goto out_bad;
}
}
- if (rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED)
+ if (rpc_createerr.cf_stat != RPC_PROGNOTREGISTERED &&
+ rpc_createerr.cf_stat != RPC_PROGVERSMISMATCH)
goto out_bad;
if (!prot) {
continue;
p_prot = protos;
}
- if (vers == pmap->pm_vers) {
- p_vers = versions;
- vers = 0;
- }
if (vers || !*++p_vers)
break;
}
for (; *probe_vers; probe_vers++) {
nfs_pmap->pm_vers = mntvers_to_nfs(*probe_vers);
if ((res = probe_nfsport(nfs_server) != 0)) {
- mnt_pmap->pm_vers = nfsvers_to_mnt(nfs_pmap->pm_vers);
+ mnt_pmap->pm_vers = *probe_vers;
if ((res = probe_mntport(mnt_server)) != 0)
return 1;
memcpy(mnt_pmap, &save_mnt, sizeof(*mnt_pmap));
enum clnt_stat res = 0;
int msock;
- switch (mnt_server->pmap.pm_vers) {
- case 3:
- case 2:
- case 1:
- if (!probe_mntport(mnt_server))
- return 0;
- clnt = mnt_openclnt(mnt_server, &msock);
- if (!clnt)
- return 0;
- res = clnt_call(clnt, MOUNTPROC_UMNT,
- (xdrproc_t)xdr_dirpath, (caddr_t)argp,
- (xdrproc_t)xdr_void, NULL,
- TIMEOUT);
- mnt_closeclnt(clnt, msock);
- if (res == RPC_SUCCESS)
- return 1;
- break;
- default:
- res = RPC_SUCCESS;
- break;
- }
+ if (!probe_mntport(mnt_server))
+ return 0;
+ clnt = mnt_openclnt(mnt_server, &msock);
+ if (!clnt)
+ return 0;
+ res = clnt_call(clnt, MOUNTPROC_UMNT,
+ (xdrproc_t)xdr_dirpath, (caddr_t)argp,
+ (xdrproc_t)xdr_void, NULL,
+ TIMEOUT);
+ mnt_closeclnt(clnt, msock);
if (res == RPC_SUCCESS)
return 1;