summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-09-11 18:00:36 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:16:51 -0400
commit4784cb51a3f66d401f8a08810231aa7dc8f44e43 (patch)
treea04a91b851bba89b0507a72e31cdee716d31bbf4 /net
parente65fe3976f594603ed7b1b4a99d3e9b867f573ea (diff)
downloadop-kernel-dev-4784cb51a3f66d401f8a08810231aa7dc8f44e43.zip
op-kernel-dev-4784cb51a3f66d401f8a08810231aa7dc8f44e43.tar.gz
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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 34738c5..a0c9f69 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++;
OpenPOWER on IntegriCloud