Skip to content

Commit 4b09ca1

Browse files
author
Trond Myklebust
committed
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: fd01b25 ("SUNRPC: ECONNREFUSED should cause a rebind.") Signed-off-by: Trond Myklebust <[email protected]>
1 parent 6e7434a commit 4b09ca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/clnt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,6 +2171,7 @@ call_connect_status(struct rpc_task *task)
21712171
task->tk_status = 0;
21722172
switch (status) {
21732173
case -ECONNREFUSED:
2174+
case -ECONNRESET:
21742175
/* A positive refusal suggests a rebind is needed. */
21752176
if (RPC_IS_SOFTCONN(task))
21762177
break;
@@ -2179,7 +2180,6 @@ call_connect_status(struct rpc_task *task)
21792180
goto out_retry;
21802181
}
21812182
fallthrough;
2182-
case -ECONNRESET:
21832183
case -ECONNABORTED:
21842184
case -ENETDOWN:
21852185
case -ENETUNREACH:

0 commit comments

Comments
 (0)