aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sunrpc/svc.h5
-rw-r--r--net/sunrpc/svcsock.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 1178689b9156..52db9c8985c5 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -292,8 +292,9 @@ static inline void svc_free_res_pages(struct svc_rqst *rqstp)
292 292
293struct svc_deferred_req { 293struct svc_deferred_req {
294 u32 prot; /* protocol (UDP or TCP) */ 294 u32 prot; /* protocol (UDP or TCP) */
295 struct sockaddr_in addr; 295 struct svc_sock *svsk;
296 struct svc_sock *svsk; /* where reply must go */ 296 struct sockaddr_storage addr; /* where reply must go */
297 size_t addrlen;
297 __be32 daddr; /* where reply must come from */ 298 __be32 daddr; /* where reply must come from */
298 struct cache_deferred_req handle; 299 struct cache_deferred_req handle;
299 int argslen; 300 int argslen;
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 08de328ce433..6680e0f0560d 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1785,7 +1785,8 @@ svc_defer(struct cache_req *req)
1785 1785
1786 dr->handle.owner = rqstp->rq_server; 1786 dr->handle.owner = rqstp->rq_server;
1787 dr->prot = rqstp->rq_prot; 1787 dr->prot = rqstp->rq_prot;
1788 dr->addr = rqstp->rq_addr; 1788 memcpy(&dr->addr, &rqstp->rq_addr, rqstp->rq_addrlen);
1789 dr->addrlen = rqstp->rq_addrlen;
1789 dr->daddr = rqstp->rq_daddr; 1790 dr->daddr = rqstp->rq_daddr;
1790 dr->argslen = rqstp->rq_arg.len >> 2; 1791 dr->argslen = rqstp->rq_arg.len >> 2;
1791 memcpy(dr->args, rqstp->rq_arg.head[0].iov_base-skip, dr->argslen<<2); 1792 memcpy(dr->args, rqstp->rq_arg.head[0].iov_base-skip, dr->argslen<<2);
@@ -1809,7 +1810,8 @@ static int svc_deferred_recv(struct svc_rqst *rqstp)
1809 rqstp->rq_arg.page_len = 0; 1810 rqstp->rq_arg.page_len = 0;
1810 rqstp->rq_arg.len = dr->argslen<<2; 1811 rqstp->rq_arg.len = dr->argslen<<2;
1811 rqstp->rq_prot = dr->prot; 1812 rqstp->rq_prot = dr->prot;
1812 rqstp->rq_addr = dr->addr; 1813 memcpy(&rqstp->rq_addr, &dr->addr, dr->addrlen);
1814 rqstp->rq_addrlen = dr->addrlen;
1813 rqstp->rq_daddr = dr->daddr; 1815 rqstp->rq_daddr = dr->daddr;
1814 rqstp->rq_respages = rqstp->rq_pages; 1816 rqstp->rq_respages = rqstp->rq_pages;
1815 return dr->argslen<<2; 1817 return dr->argslen<<2;