Skip to content

Commit

Permalink
SUNRPC: Use correct XDR encoding procedure for rpcbind SET/UNSET
Browse files Browse the repository at this point in the history
The rpcbind versions 3 and 4 SET and UNSET procedures use the same
arguments as the GETADDR procedure.

While definitely a bug, this hasn't been a problem so far since the
kernel hasn't used version 3 or 4 SET and UNSET.  But this will change
in just a moment.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jul 15, 2008
1 parent 381ba74 commit 166b88d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
map->r_status = status;
}

/*
* XDR functions for rpcbind
*/

static int rpcb_encode_mapping(struct rpc_rqst *req, __be32 *p,
struct rpcbind_args *rpcb)
{
Expand Down Expand Up @@ -581,14 +585,14 @@ static struct rpc_procinfo rpcb_procedures2[] = {
};

static struct rpc_procinfo rpcb_procedures3[] = {
PROC(SET, mapping, set),
PROC(UNSET, mapping, set),
PROC(SET, getaddr, set),
PROC(UNSET, getaddr, set),
PROC(GETADDR, getaddr, getaddr),
};

static struct rpc_procinfo rpcb_procedures4[] = {
PROC(SET, mapping, set),
PROC(UNSET, mapping, set),
PROC(SET, getaddr, set),
PROC(UNSET, getaddr, set),
PROC(GETADDR, getaddr, getaddr),
PROC(GETVERSADDR, getaddr, getaddr),
};
Expand Down

0 comments on commit 166b88d

Please sign in to comment.