Browse Source

NFS: Change cb_getattrargs to pass "struct sockaddr *" instead of sockaddr_in

Change the addr field in the cb_getattrargs struct to a "struct sockaddr *"
to support non-IPv4 addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Chuck Lever 17 years ago
parent
commit
671beed7e2
3 changed files with 3 additions and 3 deletions
  1. 1 1
      fs/nfs/callback.h
  2. 1 1
      fs/nfs/callback_proc.c
  3. 1 1
      fs/nfs/callback_xdr.c

+ 1 - 1
fs/nfs/callback.h

@@ -38,7 +38,7 @@ struct cb_compound_hdr_res {
 };
 };
 
 
 struct cb_getattrargs {
 struct cb_getattrargs {
-	struct sockaddr_in *addr;
+	struct sockaddr *addr;
 	struct nfs_fh fh;
 	struct nfs_fh fh;
 	uint32_t bitmap[2];
 	uint32_t bitmap[2];
 };
 };

+ 1 - 1
fs/nfs/callback_proc.c

@@ -25,7 +25,7 @@ __be32 nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *
 
 
 	res->bitmap[0] = res->bitmap[1] = 0;
 	res->bitmap[0] = res->bitmap[1] = 0;
 	res->status = htonl(NFS4ERR_BADHANDLE);
 	res->status = htonl(NFS4ERR_BADHANDLE);
-	clp = nfs_find_client(args->addr, 4);
+	clp = nfs_find_client((struct sockaddr_in *)args->addr, 4);
 	if (clp == NULL)
 	if (clp == NULL)
 		goto out;
 		goto out;
 
 

+ 1 - 1
fs/nfs/callback_xdr.c

@@ -176,7 +176,7 @@ static __be32 decode_getattr_args(struct svc_rqst *rqstp, struct xdr_stream *xdr
 	status = decode_fh(xdr, &args->fh);
 	status = decode_fh(xdr, &args->fh);
 	if (unlikely(status != 0))
 	if (unlikely(status != 0))
 		goto out;
 		goto out;
-	args->addr = svc_addr_in(rqstp);
+	args->addr = svc_addr(rqstp);
 	status = decode_bitmap(xdr, args->bitmap);
 	status = decode_bitmap(xdr, args->bitmap);
 out:
 out:
 	dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(status));
 	dprintk("%s: exit with status = %d\n", __FUNCTION__, ntohl(status));