[pnfs] [PATCH 3/5] Update server exchange id to draft 13
andros at umich.edu
andros at umich.edu
Tue Sep 11 15:56:11 EDT 2007
From: Andy Adamson <andros at umich.edu>
For now, the server will only support SP4_NONE.
Decode state_protect4_r into dummy variables.
Encode SP4_NONE state_protect4_r.
Correct the nfsd4_encode_exchange_id large RESERVE_SPACE.
Signed off by: Andy Adamson<andros at umich.edu>
---
fs/nfsd/nfs4xdr.c | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 43 insertions(+), 1 deletions(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index d3ce4a7..b77258e 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -925,6 +925,45 @@ nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp, struct nfsd4_exchange_
READ_BUF(4);
READ32(clid->flags);
+ /* Ignore state_protect4_a */
+ READ_BUF(4);
+ READ32(dummy);
+ switch(dummy) {
+ case SP4_NONE:
+ break;
+ case SP4_MACH_CRED:
+ READ_BUF(8);
+ READ32(dummy);
+ READ32(dummy);
+ break;
+ case SP4_SSV:
+ /* ssp_ops */
+ READ_BUF(8);
+ READ32(dummy);
+ READ32(dummy);
+
+ /* ssp_hash_algs<> */
+ READ_BUF(4);
+ READ32(dummy);
+ READ_BUF(dummy);
+ p += XDR_QUADLEN(dummy);
+
+ /* ssp_encr_algs<> */
+ READ_BUF(4);
+ READ32(dummy);
+ READ_BUF(dummy);
+ p += XDR_QUADLEN(dummy);
+
+ /* ssp_window and ssp_num_gss_handles */
+ READ_BUF(8);
+ READ32(dummy);
+ READ32(dummy);
+
+ break;
+ default:
+ goto xdr_error;
+ }
+
/* Ignore Implementation ID */
READ_BUF(4); /* nfs_impl_id4 array length */
READ32(dummy);
@@ -2765,11 +2804,14 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, int nfserr, struct nfsd
major_id_sz = strlen(major_id);
server_scope_sz = strlen(server_scope);
- RESERVE_SPACE(8+4+8+4+major_id_sz+4+server_scope_sz+4+4+8+4);
+ RESERVE_SPACE(8+4+4+4+8+4+major_id_sz+4+server_scope_sz+4);
WRITEMEM(&exid->clientid, 8);
WRITE32(exid->seqid);
WRITE32(exid->flags);
+ /* state_protect4_r */
+ WRITE32(SP4_NONE);
+
/* The server_owner struct */
WRITE64(minor_id); /* Minor id */
/* major id */
--
1.5.0.2
More information about the pNFS
mailing list