NFSv4.1: Don't clobber the seqid if exchange_id returns a confirmed clientid

If the EXCHGID4_FLAG_CONFIRMED_R flag is set, the client is in theory
supposed to already know the correct value of the seqid, in which case
RFC5661 states that it should ignore the value returned.

Also ensure that if the sanity check in nfs4_check_cl_exchange_flags
fails, then we must not change the nfs_client fields.

Finally, clean up the code: we don't need to retest the value of
'status' unless it can change.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Trond Myklebust
2012-05-26 13:41:04 -04:00
parent 6624553910
commit 32b0131069
3 changed files with 14 additions and 13 deletions

View File

@@ -1132,7 +1132,8 @@ struct nfs41_bind_conn_to_session_res {
};
struct nfs41_exchange_id_res {
struct nfs_client *client;
u64 clientid;
u32 seqid;
u32 flags;
struct nfs41_server_owner *server_owner;
struct nfs41_server_scope *server_scope;