Change the callback address in the nfs4_client, nfs_server and nfs4_setclientid
structures to be usable by any transport. Adapt the constants for the XDR
encoding/decoding.

Signed-off-by: Gilles Quillard <Gilles.Quillard@bull.net>
Signed-off-by: Aurelien Charbon <Aurelien.Charbon@ext.bull.net>

---

 fs/nfs/nfs4_fs.h          |    2 +-
 fs/nfs/nfs4xdr.c          |    9 +++++----
 include/linux/nfs_fs_sb.h |    2 +-
 include/linux/nfs_xdr.h   |    6 +++---
 4 files changed, 10 insertions(+), 9 deletions(-)

---

diff -Nru linux-2.6.11-06/fs/nfs/nfs4_fs.h linux-2.6.11-07/fs/nfs/nfs4_fs.h
--- linux-2.6.11-06/fs/nfs/nfs4_fs.h	2005-03-18 15:01:02.000000000 +0100
+++ linux-2.6.11-07/fs/nfs/nfs4_fs.h	2005-03-18 15:01:04.000000000 +0100
@@ -88,7 +88,7 @@
 	/* Our own IP address, as a null-terminated string.
 	 * This is used to generate the clientid, and the callback address.
 	 */
-	char			cl_ipaddr[16];
+	char			cl_ipaddr[80];
 	unsigned char		cl_id_uniquifier;
 };
 
diff -Nru linux-2.6.11-06/fs/nfs/nfs4xdr.c linux-2.6.11-07/fs/nfs/nfs4xdr.c
--- linux-2.6.11-06/fs/nfs/nfs4xdr.c	2005-03-14 14:51:31.000000000 +0100
+++ linux-2.6.11-07/fs/nfs/nfs4xdr.c	2005-03-18 15:01:04.000000000 +0100
@@ -101,10 +101,11 @@
 #define decode_renew_maxsz	(op_decode_hdr_maxsz)
 #define encode_setclientid_maxsz \
 				(op_encode_hdr_maxsz + \
-				4 /*server->ip_addr*/ + \
-				1 /*Netid*/ + \
-				6 /*uaddr*/ + \
-				6 + (NFS4_VERIFIER_SIZE >> 2))
+				192 /*sc_name*/ + \
+				4 /*Netid*/ + \
+				22 /*uaddr*/ + \
+				2 /*cb_program + cb_ident*/ + \
+				(NFS4_VERIFIER_SIZE >> 2))
 #define decode_setclientid_maxsz \
 				(op_decode_hdr_maxsz + \
 				2 + \
diff -Nru linux-2.6.11-06/include/linux/nfs_fs_sb.h linux-2.6.11-07/include/linux/nfs_fs_sb.h
--- linux-2.6.11-06/include/linux/nfs_fs_sb.h	2005-03-18 15:01:01.000000000 +0100
+++ linux-2.6.11-07/include/linux/nfs_fs_sb.h	2005-03-18 15:01:04.000000000 +0100
@@ -41,7 +41,7 @@
 	/* Our own IP address, as a null-terminated string.
 	 * This is used to generate the clientid, and the callback address.
 	 */
-	char			ip_addr[16];
+	char			ip_addr[80];
 	char *			mnt_path;
 	struct nfs4_client *	nfs4_state;	/* all NFSv4 state starts here */
 	struct list_head	nfs4_siblings;	/* List of other nfs_server structs
diff -Nru linux-2.6.11-06/include/linux/nfs_xdr.h linux-2.6.11-07/include/linux/nfs_xdr.h
--- linux-2.6.11-06/include/linux/nfs_xdr.h	2005-03-14 14:51:31.000000000 +0100
+++ linux-2.6.11-07/include/linux/nfs_xdr.h	2005-03-18 15:01:04.000000000 +0100
@@ -616,12 +616,12 @@
 struct nfs4_setclientid {
 	const nfs4_verifier *		sc_verifier;      /* request */
 	unsigned int			sc_name_len;
-	char				sc_name[32];	  /* request */
+	char				sc_name[80];	  /* request */
 	u32				sc_prog;          /* request */
 	unsigned int			sc_netid_len;
-	char				sc_netid[4];	  /* request */
+	char				sc_netid[12];	  /* request */
 	unsigned int			sc_uaddr_len;
-	char				sc_uaddr[24];     /* request */
+	char				sc_uaddr[80];     /* request */
 	u32				sc_cb_ident;      /* request */
 };
 

