diff options
| author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2023-09-17 09:06:05 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-28 16:56:21 +0000 |
| commit | 46d6b768072baf8c9e520056cfbceb28535ccbe5 (patch) | |
| tree | af6b6d7909559dc843d78f23f64e0fe89c31328b /net | |
| parent | a7032d4d6499165de77d60b57a379ccd6127d0cd (diff) | |
| download | linux-46d6b768072baf8c9e520056cfbceb28535ccbe5.tar.gz linux-46d6b768072baf8c9e520056cfbceb28535ccbe5.tar.bz2 linux-46d6b768072baf8c9e520056cfbceb28535ccbe5.zip | |
SUNRPC: ECONNRESET might require a rebind
[ Upstream commit 4b09ca1508a60be30b2e3940264e93d7aeb5c97e ]
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: fd01b2597941 ("SUNRPC: ECONNREFUSED should cause a rebind.")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/sunrpc/clnt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7756c62e0c3e..fc37f314a09d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2088,6 +2088,7 @@ call_connect_status(struct rpc_task *task) task->tk_status = 0; switch (status) { case -ECONNREFUSED: + case -ECONNRESET: /* A positive refusal suggests a rebind is needed. */ if (RPC_IS_SOFTCONN(task)) break; @@ -2096,7 +2097,6 @@ call_connect_status(struct rpc_task *task) goto out_retry; } fallthrough; - case -ECONNRESET: case -ECONNABORTED: case -ENETDOWN: case -ENETUNREACH: |
