diff options
| author | Rick Macklem <rmacklem@FreeBSD.org> | 2026-05-05 00:04:00 +0000 |
|---|---|---|
| committer | Rick Macklem <rmacklem@FreeBSD.org> | 2026-05-05 00:04:00 +0000 |
| commit | 03e9e83f358678bab5e4c1ddf9c9d8faa7183cbb (patch) | |
| tree | 8c6dd609ed64917695c15539fa5c449b275bf183 /sys | |
| parent | 658bb99db9c7872f92ccb86ed2674c72636436d2 (diff) | |
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/fs/nfsserver/nfs_nfsdserv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c index 855d018e72d2..ad0f495bbd69 100644 --- a/sys/fs/nfsserver/nfs_nfsdserv.c +++ b/sys/fs/nfsserver/nfs_nfsdserv.c @@ -4869,6 +4869,14 @@ nfsrvd_createsession(struct nfsrv_descript *nd, __unused int isdgram, *tl++ = txdr_unsigned(sep->sess_cbsess.nfsess_foreslots); *tl++ = txdr_unsigned(1); *tl = txdr_unsigned(0); /* No RDMA. */ + /* + * Although the client accepts slot#s up to + * sess_cbsess.nfsess_foreslots, the server can only use + * a maximum of NFSV4_SLOTS, so clip it to avoid ever using + * too high a slot. + */ + if (sep->sess_cbsess.nfsess_foreslots > NFSV4_SLOTS) + sep->sess_cbsess.nfsess_foreslots = NFSV4_SLOTS; } nfsmout: if (nd->nd_repstat != 0 && sep != NULL) |
