diff options
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 | |||
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: |