]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/nfsd/nfs4state.c
nfsd4: allow an EXCHANGE_ID to kill a 4.0 client
[karo-tx-linux.git] / fs / nfsd / nfs4state.c
index f372a6edef34b67d0ec284f94ce89d5bb7e32cb6..c88f5c103e87611a04bd20b8db7dcb255d336de4 100644 (file)
@@ -1553,8 +1553,10 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
        conf = find_confirmed_client_by_str(dname, strhashval);
        if (conf) {
                if (!clp_used_exchangeid(conf)) {
-                       status = nfserr_clid_inuse; /* XXX: ? */
-                       goto out;
+                       if (exid->flags & EXCHGID4_FLAG_UPD_CONFIRMED_REC_A) {
+                               status = nfserr_inval; /* buggy client */
+                               goto out;
+                       }
                }
                if (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) {
                        /* 18.35.4 case 9 */
@@ -1574,6 +1576,10 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
                        expire_client(conf);
                        goto out_new;
                }
+               if (!clp_used_exchangeid(conf)) {
+                       status = nfserr_inval;
+                       goto out;
+               }
                /*
                 * Set bit when the owner id and verifier map to an already
                 * confirmed client id (18.35.3).