]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make the NFSv4.n client's recovery from NFSERR_BADSESSION RFC5661 conformant.
authorRick Macklem <rmacklem@FreeBSD.org>
Wed, 22 Apr 2020 21:00:14 +0000 (21:00 +0000)
committerRick Macklem <rmacklem@FreeBSD.org>
Wed, 22 Apr 2020 21:00:14 +0000 (21:00 +0000)
commit897d7d45bac80abe2c23f8d5140b70809152fe0e
tree4d782e4c0688cdd39b03b67086a9a2dbdb324ec7
parent87e9ade239dc42783c41b69077bbb9c75ab0702a
Make the NFSv4.n client's recovery from NFSERR_BADSESSION RFC5661 conformant.

RFC5661 specifies that a client's recovery upon receipt of NFSERR_BADSESSION
should first consist of a CreateSession operation using the extant ClientID.
If that fails, then a full recovery beginning with the ExchangeID operation
is to be done.
Without this patch, the FreeBSD client did not attempt the CreateSession
operation with the extant ClientID and went directly to a full recovery
beginning with ExchangeID. I have had this patch several years, but since
no extant NFSv4.n server required the CreateSession with extant ClientID,
I have never committed it.
I an committing it now, since I suspect some future NFSv4.n server will
require this and it should not negatively impact recovery for extant NFSv4.n
servers, since they should all return NFSERR_STATECLIENTID for this first
CreateSession.

The patched client has been tested for recovery against both the FreeBSD
and Linux NFSv4.n servers and no problems have been observed.

MFC after: 1 month
sys/fs/nfs/nfs_var.h
sys/fs/nfsclient/nfs_clrpcops.c
sys/fs/nfsclient/nfs_clstate.c