NFS: Adjust nfs_clone_mount structure to store "struct sockaddr *"
Change the addr field in the nfs_clone_mount structure to store a "struct sockaddr *" to support non-IPv4 addresses in the NFS client. Note this is mostly a cosmetic change, and does not actually allow referrals using IPv6 addresses. The existing referral code assumes that the server returns a string that represents an IPv4 address. This code needs to support hostnames and IPv6 addresses as well as IPv4 addresses, thus it will need to be reorganized completely (to handle DNS resolution in user space). 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>
This commit is contained in:

committed by
Trond Myklebust

parent
dcecae0ff4
commit
6677d09513
@@ -1094,8 +1094,8 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
|
||||
/* Get a client representation.
|
||||
* Note: NFSv4 always uses TCP, */
|
||||
error = nfs4_set_client(server, data->hostname,
|
||||
(struct sockaddr *)data->addr,
|
||||
sizeof(*data->addr),
|
||||
data->addr,
|
||||
data->addrlen,
|
||||
parent_client->cl_ipaddr,
|
||||
data->authflavor,
|
||||
parent_server->client->cl_xprt->prot,
|
||||
|
Reference in New Issue
Block a user