Commit 80f96427 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.x: Enforce the ca_maxresponsesize_cached on the back channel

We have no duplicate reply cache, so we always set the back channel
ca_maxresponsesize_cached to zero when negotiating the session.
That means we should always error out as soon as we see the server
set args->csa_cachethis.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent f74a834a
...@@ -381,9 +381,8 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args) ...@@ -381,9 +381,8 @@ validate_seqid(struct nfs4_slot_table *tbl, struct cb_sequenceargs * args)
if (args->csa_cachethis == 0) if (args->csa_cachethis == 0)
return htonl(NFS4ERR_RETRY_UNCACHED_REP); return htonl(NFS4ERR_RETRY_UNCACHED_REP);
/* The ca_maxresponsesize_cached is 0 with no DRC */ /* Liar! We never allowed you to set csa_cachethis != 0 */
else if (args->csa_cachethis == 1) return htonl(NFS4ERR_SEQ_FALSE_RETRY);
return htonl(NFS4ERR_REP_TOO_BIG_TO_CACHE);
} }
/* Wraparound */ /* Wraparound */
...@@ -500,6 +499,10 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args, ...@@ -500,6 +499,10 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
cps->slotid = args->csa_slotid; cps->slotid = args->csa_slotid;
/* The ca_maxresponsesize_cached is 0 with no DRC */
if (args->csa_cachethis != 0)
return htonl(NFS4ERR_REP_TOO_BIG_TO_CACHE);
/* /*
* Check for pending referring calls. If a match is found, a * Check for pending referring calls. If a match is found, a
* related callback was received before the response to the original * related callback was received before the response to the original
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment