NFS: Support non-IPv4 addresses in nfs_parsed_mount_data
Replace the nfs_server and mount_server address fields in the
nfs_parsed_mount_data structure with a "struct sockaddr_storage"
instead of a "struct sockaddr_in".
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>
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index ba114fa..9066133 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -581,7 +581,7 @@
struct nfs_client_initdata cl_init = {
.hostname = data->nfs_server.hostname,
.addr = (const struct sockaddr *)&data->nfs_server.address,
- .addrlen = sizeof(data->nfs_server.address),
+ .addrlen = data->nfs_server.addrlen,
.rpc_ops = &nfs_v2_clientops,
};
struct nfs_client *clp;
@@ -1018,7 +1018,7 @@
error = nfs4_set_client(server,
data->nfs_server.hostname,
(struct sockaddr *)&data->nfs_server.address,
- sizeof(data->nfs_server.address),
+ data->nfs_server.addrlen,
data->client_address,
data->auth_flavors[0],
data->nfs_server.protocol,