summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2021-11-18 03:07:21 +0000
committerDamien Miller <djm@cvs.openbsd.org>2021-11-18 03:07:21 +0000
commit86e68bfd1cf91f42aff919ceade0fabfa6d53d58 (patch)
tree5af936d05f8c40d8138ab81e97f5952af379c8c7 /usr.bin/ssh/sshd.c
parent4f054f68230b42a7e105d54ed42e3dba0f78ee7b (diff)
check for POLLHUP as well as POLLIN in sshd listen loop;
ok deraadt millert
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r--usr.bin/ssh/sshd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 4fb6a0f31ea..29adda33f84 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.580 2021/11/17 21:06:39 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.581 2021/11/18 03:07:20 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1165,7 +1165,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
for (i = 0; i < options.max_startups; i++) {
if (startup_pipes[i] == -1 ||
- !(pfd[num_listen_socks+i].revents & POLLIN))
+ !(pfd[num_listen_socks+i].revents & (POLLIN|POLLHUP)))
continue;
switch (read(startup_pipes[i], &c, sizeof(c))) {
case -1: