summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2021-04-14 11:42:55 +1000
committerDamien Miller <djm@mindrot.org>2021-04-14 11:42:55 +1000
commit2dc328023f60212cd29504fc05d849133ae47355 (patch)
tree4218143c22dea08816cddfc7ac167e665596849b
parentd5d6b7d76d171a2e6861609dcd92e714ee62ad88 (diff)
sshd don't exit on transient read errors
openssh-8.5 introduced a regression that would cause sshd to exit because of transient read errors on the network socket (e.g. EINTR, EAGAIN). Reported by balu.gajjala AT gmail.com via bz3297
-rw-r--r--serverloop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/serverloop.c b/serverloop.c
index 66917971..70a20ab4 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -333,7 +333,7 @@ process_input(struct ssh *ssh, fd_set *readset, int connection_in)
return -1;
} else if (len == -1) {
if (errno == EINTR || errno == EAGAIN ||
- errno != EWOULDBLOCK)
+ errno == EWOULDBLOCK)
return 0;
verbose("Read error from remote host %s port %d: %s",
ssh_remote_ipaddr(ssh), ssh_remote_port(ssh),