SUNRPC: Use "sockaddr_storage" for storing RPC client's remote peer address
IPv6 addresses are big (128 bytes). Now that no RPC client consumers treat the addr field in rpc_xprt structs as an opaque, and access it only via the API calls, we can safely widen the field in the rpc_xprt struct to accomodate larger addresses. Test plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:

committed by
Trond Myklebust

parent
e7f7865743
commit
c4efcb1d3e
@@ -896,7 +896,8 @@ static struct rpc_xprt *xprt_setup(int proto, struct sockaddr_in *ap, struct rpc
|
||||
if ((xprt = kzalloc(sizeof(struct rpc_xprt), GFP_KERNEL)) == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
xprt->addr = *ap;
|
||||
memcpy(&xprt->addr, ap, sizeof(*ap));
|
||||
xprt->addrlen = sizeof(*ap);
|
||||
|
||||
switch (proto) {
|
||||
case IPPROTO_UDP:
|
||||
|
Reference in New Issue
Block a user