[pnfs] [PATCH 1/4] nfsd exchange_id check for invalid flags
andros at umich.edu
andros at umich.edu
Thu May 31 10:54:14 EDT 2007
From: Andy Adamson <andros at umich.edu>
The NFSv41 server MUST return NFSERR_INVAL if undefined exchange_id flags are
set.
Signed-off by: Andy Adamson <andros at citi.umich.edu>
---
fs/nfsd/nfs4state.c | 2 +-
include/linux/nfs4.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 8d71c1d..575c8fb 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1066,7 +1066,7 @@ int nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_exchange_id *clid)
nfs4_verifier verf = clid->verifier;
u32 ip_addr = rqstp->rq_addr.sin_addr.s_addr;
- if (!check_name(clname))
+ if (!check_name(clname) || (clid->flags & EXCHGID4_INVAL_FLAG_MASK))
return nfserr_inval;
status = nfs4_make_rec_clidname(dname, &clname);
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index ed583fa..90ae365 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -96,6 +96,7 @@
#define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000
#define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000
#define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000
+#define EXCHGID4_INVAL_FLAG_MASK 0x77707774
#define NFS4_LENGTH_EOF (~(u64)0)
--
1.5.0.2
More information about the pNFS
mailing list