freebsd-dev/sys/fs/nfs
Rick Macklem 73b1879c2d Add a couple of safety belt checks to the NFSv4.1 client related to sessions.
There were a couple of cases in newnfs_request() that it assumed that it
was an NFSv4.1 mount with a session. This should always be the case when
a Sequence operation is in the reply or the server replies NFSERR_BADSESSION.
However, if a server was broken and sent an erroneous reply, these safety
belt checks should avoid trouble.
The one check required a small tweak to nfsmnt_mdssession() so that it
returns NULL when there is no session instead of the offset of the field
in the structure (0x8 for i386).
This patch should have no effect on normal operation of the client.
Found by inspection during pNFS server development.

MFC after:	2 weeks
2018-06-11 19:00:07 +00:00
..
nfs_commonacl.c sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfs_commonkrpc.c Add a couple of safety belt checks to the NFSv4.1 client related to sessions. 2018-06-11 19:00:07 +00:00
nfs_commonport.c Fix the default number of threads for Flex File layout pNFS client I/O. 2018-06-02 00:11:26 +00:00
nfs_commonsubs.c Add the BindConnectiontoSession operation to the NFSv4.1 server. 2018-06-01 19:47:41 +00:00
nfs_var.h Add the BindConnectiontoSession operation to the NFSv4.1 server. 2018-06-01 19:47:41 +00:00
nfs.h Delete an unused macro and clean up a comment about it. 2018-06-09 23:14:59 +00:00
nfscl.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfsclstate.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfsdport.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfskpiport.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfsm_subs.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfsport.h Delete some macros that are unused. 2018-06-09 23:38:22 +00:00
nfsproto.h Add the BindConnectiontoSession operation to the NFSv4.1 server. 2018-06-01 19:47:41 +00:00
nfsrvcache.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
nfsrvstate.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
nfsv4_errstr.h sys/fs: further adoption of SPDX licensing ID tags. 2017-11-27 15:15:37 +00:00
rpcv2.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
xdr_subs.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00