diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-09-12 00:00:36 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 23:16:51 +0200 |
commit | 4784cb51a3f66d401f8a08810231aa7dc8f44e43 (patch) | |
tree | a04a91b851bba89b0507a72e31cdee716d31bbf4 /net | |
parent | SUNRPC: Make rpcb_decode_getaddr more picky about universal addresses (diff) | |
download | linux-4784cb51a3f66d401f8a08810231aa7dc8f44e43.tar.xz linux-4784cb51a3f66d401f8a08810231aa7dc8f44e43.zip |
SUNRPC: Retry bad rpcbind replies
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/rpcb_clnt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c index 34738c5cf312..a0c9f6905517 100644 --- a/net/sunrpc/rpcb_clnt.c +++ b/net/sunrpc/rpcb_clnt.c @@ -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++; |