struct nfs_client_initdata {
const char *hostname;
const struct sockaddr_in *addr;
+ size_t addrlen;
const struct nfs_rpc_ops *rpc_ops;
};
atomic_set(&clp->cl_count, 1);
clp->cl_cons_state = NFS_CS_INITING;
- memcpy(&clp->cl_addr, cl_init->addr, sizeof(clp->cl_addr));
+ memcpy(&clp->cl_addr, cl_init->addr, cl_init->addrlen);
+ clp->cl_addrlen = cl_init->addrlen;
if (cl_init->hostname) {
clp->cl_hostname = kstrdup(cl_init->hostname, GFP_KERNEL);
struct rpc_create_args args = {
.protocol = proto,
.address = (struct sockaddr *)&clp->cl_addr,
- .addrsize = sizeof(clp->cl_addr),
+ .addrsize = clp->cl_addrlen,
.timeout = &timeparms,
.servername = clp->cl_hostname,
.program = &nfs_program,
struct nfs_client_initdata cl_init = {
.hostname = data->nfs_server.hostname,
.addr = &data->nfs_server.address,
+ .addrlen = sizeof(data->nfs_server.address),
.rpc_ops = &nfs_v2_clientops,
};
struct nfs_client *clp;
struct nfs_client_initdata cl_init = {
.hostname = hostname,
.addr = addr,
+ .addrlen = sizeof(*addr),
.rpc_ops = &nfs_v4_clientops,
};
struct nfs_client *clp;
#define NFS_CS_CALLBACK 1 /* - callback started */
#define NFS_CS_IDMAP 2 /* - idmap started */
#define NFS_CS_RENEWD 3 /* - renewd started */
- struct sockaddr_in cl_addr; /* server identifier */
+ struct sockaddr_storage cl_addr; /* server identifier */
+ size_t cl_addrlen;
char * cl_hostname; /* hostname of server */
struct list_head cl_share_link; /* link in global client list */
struct list_head cl_superblocks; /* List of nfs_server structs */