Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4784cb51 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust
Browse files

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent e65fe397
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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++;