From: djm@openbsd.org Date: Wed, 17 Nov 2021 21:06:39 +0000 (+0000) Subject: upstream: set num_listen_socks to 0 on close-all instead of -1, X-Git-Tag: V_8_9_P1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd7e7de4ddb4399c7e929b44f2bbfc118eddfcf8;p=thirdparty%2Fopenssh-portable.git 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 --- diff --git a/sshd.c b/sshd.c index 6953d04d8..9ada0c18b 100644 --- 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 * Copyright (c) 1995 Tatu Ylonen , 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