opnsense-src/sys/fs
Rick Macklem db2eff1cff nfsd: Fix CreateSession for an established ClientID
I mis-read the RFC w.r.t. handling of the sequenceid
when a CreateSession is done after the initial one
that confirms the ClientID.  Fortunately this does
not affect most extant NFSv4.1/4.2 clients, since
they only acquire a single session for TCP for a
ClientID (Solaris might be an exception?).

This patch fixes the server to handle this case,
where the RFC requires the sequenceid be incremented
for each CreateSession and is required to reply to
a retried CreateSession with a cached reply.
It adds a field to nfsclient called lc_prevsess,
which caches the sessionid, which is the only field
in a CreateSession reply that will change for a
retry, to implement this reply cache.

The recent commits up to d4a11b3e3b that mark
session slots bad when "intr" and/or "soft" mounts
are used by the client needs this server patch.
Without this patch, the client will do a full
recovery, including a new ClientID, losing all
byte range locks.  However, prior to the recent
client commits, the client would hang when all
session slots were bad, so even without this
patch it is not a regression.

PR: 260011
(cherry picked from commit 088ba4356a)
2022-07-28 13:20:33 -07:00
..
autofs Ensure that dirent's d_off field is initialized 2021-01-03 11:50:31 -05:00
cd9660 buffer pager: allow get_blksize method to return error 2021-09-24 03:26:59 +03:00
cuse cuse(3): Allow shared memory allocations up to, but excluding 2 GBytes. 2022-07-27 11:33:53 +02:00
deadfs vn_open(): If the vnode is reclaimed during open(2), do not return error. 2021-02-24 09:42:42 +02:00
devfs fs: fix a few common typos in source code comments 2022-02-09 07:18:56 +01:00
ext2fs fs: fix a few common typos in source code comments 2022-02-09 07:18:56 +01:00
fdescfs fdescfs: allow chown/utime etc on fdescfs fd for underlying files opened with O_PATH 2022-06-13 22:29:23 +03:00
fifofs fifo: support flock 2021-10-11 09:12:48 +00:00
fuse fusefs: handle evil servers that return illegal inode numbers 2022-06-18 08:16:20 -06:00
mntfs mntfs: lock mntfs pseudo devfs vnode properly 2021-11-19 06:25:28 +02:00
msdosfs msdosfs: Fix mounting when the device sector size is >512B 2022-02-21 09:57:54 -05:00
nfs nfsd: Fix CreateSession for an established ClientID 2022-07-28 13:20:33 -07:00
nfsclient nfscl: Fix CreateSession for an established ClientID 2022-07-28 13:18:49 -07:00
nfsserver nfsd: Fix CreateSession for an established ClientID 2022-07-28 13:20:33 -07:00
nullfs null_vptocnp(): busy nullfs mp instead of refing it 2022-06-21 15:43:38 +03:00
procfs sysent: Get rid of bogus sys/sysent.h include. 2022-06-17 22:35:31 +03:00
pseudofs pseudofs: Destroy vncache hashtbl on pseudofs module unload. 2022-06-17 22:33:41 +03:00
smbfs Ensure that dirent's d_off field is initialized 2021-01-03 11:50:31 -05:00
tmpfs tmpfs: remove write-only variables 2021-10-27 03:24:40 +03:00
udf Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
unionfs unionfs: do not use bare struct componentname 2021-07-07 13:23:30 +03:00