Commit 4b09ca15 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: ECONNRESET might require a rebind

If connect() is returning ECONNRESET, it usually means that nothing is
listening on that port. If so, a rebind might be required in order to
obtain the new port on which the RPC service is listening.

Fixes: fd01b259 ("SUNRPC: ECONNREFUSED should cause a rebind.")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 6e7434ab
...@@ -2171,6 +2171,7 @@ call_connect_status(struct rpc_task *task) ...@@ -2171,6 +2171,7 @@ call_connect_status(struct rpc_task *task)
task->tk_status = 0; task->tk_status = 0;
switch (status) { switch (status) {
case -ECONNREFUSED: case -ECONNREFUSED:
case -ECONNRESET:
/* A positive refusal suggests a rebind is needed. */ /* A positive refusal suggests a rebind is needed. */
if (RPC_IS_SOFTCONN(task)) if (RPC_IS_SOFTCONN(task))
break; break;
...@@ -2179,7 +2180,6 @@ call_connect_status(struct rpc_task *task) ...@@ -2179,7 +2180,6 @@ call_connect_status(struct rpc_task *task)
goto out_retry; goto out_retry;
} }
fallthrough; fallthrough;
case -ECONNRESET:
case -ECONNABORTED: case -ECONNABORTED:
case -ENETDOWN: case -ENETDOWN:
case -ENETUNREACH: case -ENETUNREACH:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment