diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2006-08-22 20:06:17 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-09-22 23:24:46 -0400 |
commit | 081f79a9b09b634f0dc08ed014e0195464d52535 (patch) | |
tree | ad0829216553e8f86a913dac626c6617e5509398 /net | |
parent | 44c31be261540acf66ddd730631ead8009cc361d (diff) |
SUNRPC: Teach the RPC portmapper to use the new rpc_peeraddr() API.
Hide the details of how the RPC client stores remote peer addresses from
the RPC portmapper.
Test plan:
Destructive testing (unplugging the network temporarily). Connectathon
with UDP and TCP. NFSv2/3 and NFSv4 mounting should be carefully checked.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/pmap_clnt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c index f7b279a63baa..3eee8e907275 100644 --- a/net/sunrpc/pmap_clnt.c +++ b/net/sunrpc/pmap_clnt.c | |||
@@ -89,7 +89,7 @@ void rpc_getport(struct rpc_task *task) | |||
89 | { | 89 | { |
90 | struct rpc_clnt *clnt = task->tk_client; | 90 | struct rpc_clnt *clnt = task->tk_client; |
91 | struct rpc_xprt *xprt = task->tk_xprt; | 91 | struct rpc_xprt *xprt = task->tk_xprt; |
92 | struct sockaddr_in *sap = &xprt->addr; | 92 | struct sockaddr_in addr; |
93 | struct portmap_args *map; | 93 | struct portmap_args *map; |
94 | struct rpc_clnt *pmap_clnt; | 94 | struct rpc_clnt *pmap_clnt; |
95 | struct rpc_task *child; | 95 | struct rpc_task *child; |
@@ -124,7 +124,8 @@ void rpc_getport(struct rpc_task *task) | |||
124 | map->pm_port = 0; | 124 | map->pm_port = 0; |
125 | map->pm_task = task; | 125 | map->pm_task = task; |
126 | 126 | ||
127 | pmap_clnt = pmap_create(clnt->cl_server, sap, map->pm_prot, 0); | 127 | rpc_peeraddr(clnt, (struct sockaddr *) &addr, sizeof(addr)); |
128 | pmap_clnt = pmap_create(clnt->cl_server, &addr, map->pm_prot, 0); | ||
128 | if (IS_ERR(pmap_clnt)) { | 129 | if (IS_ERR(pmap_clnt)) { |
129 | task->tk_status = PTR_ERR(pmap_clnt); | 130 | task->tk_status = PTR_ERR(pmap_clnt); |
130 | goto bailout; | 131 | goto bailout; |