Skip to content

Commit

Permalink
SUNRPC: Retry bad rpcbind replies
Browse files Browse the repository at this point in the history
When a server returns a bad rpcbind reply, make rpcbind client recovery logic
retry with an older protocol version.  Older versions are more likely to work
correctly.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Oct 9, 2007
1 parent e65fe39 commit 4784cb5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
struct rpc_xprt *xprt = map->r_xprt;
int status = child->tk_status;

/* Garbage reply: retry with a lesser rpcbind version */
if (status == -EIO)
status = -EPROTONOSUPPORT;

/* rpcbind server doesn't support this rpcbind protocol version */
if (status == -EPROTONOSUPPORT)
xprt->bind_index++;
Expand Down

0 comments on commit 4784cb5

Please sign in to comment.