upstream: set num_listen_socks to 0 on close-all instead of -1,

which interferes with the new poll()-based listen loop; spotted and debugged
by anton@+deraadt@

OpenBSD-Commit-ID: f7ab8ab124f615a2e0c45fee14c38d2f2abbabbd
This commit is contained in:
djm@openbsd.org 2021-11-17 21:06:39 +00:00 committed by Damien Miller
parent fd9343579a
commit fd7e7de4dd
1 changed files with 2 additions and 2 deletions

4
sshd.c
View File

@ -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