Commit f984a7ce authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd: return CLID_INUSE for unexpected SETCLIENTID_CONFIRM case

Somebody with a Solaris client was hitting this case.  We haven't
figured out why yet, and don't have a reproducer.  Meanwhile Frank
noticed that RFC 7530 actually recommends CLID_INUSE for this case.
Unlikely to help the original reporter, but may as well fix it.
Reported-by: default avatarFrank Filz <ffilzlnx@mindspring.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 3fcbbd24
...@@ -3111,10 +3111,11 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, ...@@ -3111,10 +3111,11 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
/* /*
* We try hard to give out unique clientid's, so if we get an * We try hard to give out unique clientid's, so if we get an
* attempt to confirm the same clientid with a different cred, * attempt to confirm the same clientid with a different cred,
* there's a bug somewhere. Let's charitably assume it's our * the client may be buggy; this should never happen.
* bug. *
* Nevertheless, RFC 7530 recommends INUSE for this case:
*/ */
status = nfserr_serverfault; status = nfserr_clid_inuse;
if (unconf && !same_creds(&unconf->cl_cred, &rqstp->rq_cred)) if (unconf && !same_creds(&unconf->cl_cred, &rqstp->rq_cred))
goto out; goto out;
if (conf && !same_creds(&conf->cl_cred, &rqstp->rq_cred)) if (conf && !same_creds(&conf->cl_cred, &rqstp->rq_cred))
......
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