summaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-12-10 14:56:54 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-01-30 02:05:51 -0500
commitcc38bac3a0093b3b7928efc6ff8e9faf9e75f41d (patch)
tree971f0653619e9068408d2938af37147f7448a53d /include/linux/nfs_xdr.h
parent0fb2b7e945f55a8317e5f58db7c068aab5b825a1 (diff)
downloadlinux-cc38bac3a0093b3b7928efc6ff8e9faf9e75f41d.tar.gz
linux-cc38bac3a0093b3b7928efc6ff8e9faf9e75f41d.tar.bz2
linux-cc38bac3a0093b3b7928efc6ff8e9faf9e75f41d.zip
NFS: Ensure NFSv4 SETCLIENTID send buffer is large enough
Ensure that the RPC buffer size specified for NFSv4 SETCLIENTID procedures matches what we are encoding into the buffer. See the definition of struct nfs4_setclientid {} and the encode_setclientid() function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 6b213a64b15f..d8e395d0c7c9 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -666,16 +666,17 @@ struct nfs4_rename_res {
struct nfs_fattr * new_fattr;
};
+#define NFS4_SETCLIENTID_NAMELEN (48)
struct nfs4_setclientid {
- const nfs4_verifier * sc_verifier; /* request */
+ const nfs4_verifier * sc_verifier;
unsigned int sc_name_len;
- char sc_name[48]; /* request */
- u32 sc_prog; /* request */
+ char sc_name[NFS4_SETCLIENTID_NAMELEN];
+ u32 sc_prog;
unsigned int sc_netid_len;
- char sc_netid[4]; /* request */
+ char sc_netid[RPCBIND_MAXNETIDLEN];
unsigned int sc_uaddr_len;
- char sc_uaddr[24]; /* request */
- u32 sc_cb_ident; /* request */
+ char sc_uaddr[RPCBIND_MAXUADDRLEN];
+ u32 sc_cb_ident;
};
struct nfs4_statfs_arg {