SUNRPC: use proper network namespace in rpcbind RPCBPROC_GETADDR procedure

Pass request socket network namespace to rpc_uaddr2sockaddr() instead of
hardcoded "init_net",  when decoding address in RPCBPROC_GETADDR procedure.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Stanislav Kinsbursky 2012-01-13 14:02:40 +04:00 committed by Trond Myklebust
parent f2ac4dc911
commit b030fb0bb1
1 changed files with 2 additions and 1 deletions

View File

@ -934,7 +934,8 @@ static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr,
dprintk("RPC: %5u RPCB_%s reply: %s\n", task->tk_pid, dprintk("RPC: %5u RPCB_%s reply: %s\n", task->tk_pid,
task->tk_msg.rpc_proc->p_name, (char *)p); task->tk_msg.rpc_proc->p_name, (char *)p);
if (rpc_uaddr2sockaddr(&init_net, (char *)p, len, sap, sizeof(address)) == 0) if (rpc_uaddr2sockaddr(req->rq_xprt->xprt_net, (char *)p, len,
sap, sizeof(address)) == 0)
goto out_fail; goto out_fail;
rpcb->r_port = rpc_get_port(sap); rpcb->r_port = rpc_get_port(sap);