1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

nfscl: Fix support for doing Null RPCs

Although the NFS client does not currently perform Null RPCs,
this fix is needed if/when it might do so.
Found during testing of experimental code that uses Null RPCs
to maintain/monitor TCP connections for "nconnect" mounts.

MFC after:	3 months
This commit is contained in:
Rick Macklem 2023-04-07 12:57:26 -07:00
parent ff2f1f691c
commit 4adb28c0ab

View File

@ -375,6 +375,10 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
nd->nd_mreq = nd->nd_mb = mb;
nd->nd_bpos = mtod(mb, char *);
/* For NFSPROC_NULL, there are no arguments. */
if (procnum == NFSPROC_NULL)
goto out;
/*
* And fill the first file handle into the request.
*/
@ -470,6 +474,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp,
} else {
(void)nfsm_fhtom(NULL, nd, nfhp, fhlen, 0);
}
out:
if (procnum < NFSV42_NPROCS)
NFSINCRGLOBAL(nfsstatsv1.rpccnt[procnum]);
}