diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2006-08-23 02:06:19 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-09-23 05:24:48 +0200 |
commit | c4efcb1d3e0bc76aeb9ca6301d19a5079893c6c9 (patch) | |
tree | 23f113b897f1ab2e00e4fcf774d93711d7f703b8 /net/sunrpc/xprt.c | |
parent | SUNRPC: Teach rpc_pipe.c to use new rpc_peeraddr() API (diff) | |
download | linux-c4efcb1d3e0bc76aeb9ca6301d19a5079893c6c9.tar.xz linux-c4efcb1d3e0bc76aeb9ca6301d19a5079893c6c9.zip |
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.c | 3 |
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 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: |