aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-22 20:06:19 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:48 -0400
commitc4efcb1d3e0bc76aeb9ca6301d19a5079893c6c9 (patch)
tree23f113b897f1ab2e00e4fcf774d93711d7f703b8 /net/sunrpc/xprt.c
parente7f7865743fff3d3938ec7540e5a784d662426da (diff)
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>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index b45abd0743cb..4987517cc74b 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -896,7 +896,8 @@ static struct rpc_xprt *xprt_setup(int proto, struct sockaddr_in *ap, struct rpc
896 if ((xprt = kzalloc(sizeof(struct rpc_xprt), GFP_KERNEL)) == NULL) 896 if ((xprt = kzalloc(sizeof(struct rpc_xprt), GFP_KERNEL)) == NULL)
897 return ERR_PTR(-ENOMEM); 897 return ERR_PTR(-ENOMEM);
898 898
899 xprt->addr = *ap; 899 memcpy(&xprt->addr, ap, sizeof(*ap));
900 xprt->addrlen = sizeof(*ap);
900 901
901 switch (proto) { 902 switch (proto) {
902 case IPPROTO_UDP: 903 case IPPROTO_UDP: