]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: set num_listen_socks to 0 on close-all instead of -1,
authordjm@openbsd.org <djm@openbsd.org>
Wed, 17 Nov 2021 21:06:39 +0000 (21:06 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 17 Nov 2021 22:14:22 +0000 (09:14 +1100)
which interferes with the new poll()-based listen loop; spotted and debugged
by anton@+deraadt@

OpenBSD-Commit-ID: f7ab8ab124f615a2e0c45fee14c38d2f2abbabbd

sshd.c

diff --git a/sshd.c b/sshd.c
index 6953d04d8f2494307c54971f7b1449247cfe723a..9ada0c18bbe782fc449414c5aa1b084aea80eaff 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.579 2021/11/14 18:47:43 deraadt Exp $ */
+/* $OpenBSD: sshd.c,v 1.580 2021/11/17 21:06:39 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -273,7 +273,7 @@ close_listen_socks(void)
 
        for (i = 0; i < num_listen_socks; i++)
                close(listen_socks[i]);
-       num_listen_socks = -1;
+       num_listen_socks = 0;
 }
 
 static void