git: cb1b77808a1e - stable/13 - nfscl: Fix support for doing Null RPCs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Jul 2023 01:55:23 UTC
The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cb1b77808a1edf8ca803568439e8ef8a092192fb commit cb1b77808a1edf8ca803568439e8ef8a092192fb Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2023-04-07 19:57:26 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2023-07-06 01:53:47 +0000 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. (cherry picked from commit 4adb28c0abfa3b8d076c7249f61a093c6eb9dac2) --- sys/fs/nfs/nfs_commonsubs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index af9f66f03488..a738f8cc6fb1 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -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. */ @@ -469,6 +473,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]); }