-/* $OpenBSD: channels.c,v 1.416 2022/04/11 22:52:08 djm Exp $ */
+/* $OpenBSD: channels.c,v 1.417 2022/04/20 04:19:11 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
c = sc->channels[i];
if (c == NULL)
continue;
+ /* Try to keep IO going while rekeying */
+ if (ssh_packet_is_rekeying(ssh) && c->type != SSH_CHANNEL_OPEN)
+ continue;
if (c->delayed) {
if (table == CHAN_PRE)
c->delayed = 0;
/* Allocate 4x pollfd for each channel (rfd, wfd, efd, sock) */
if (sc->channels_alloc >= (INT_MAX / 4) - npfd_reserved)
fatal_f("too many channels"); /* shouldn't happen */
- if (!ssh_packet_is_rekeying(ssh))
- npfd += sc->channels_alloc * 4;
+ npfd += sc->channels_alloc * 4;
if (npfd > *npfd_allocp) {
*pfdp = xrecallocarray(*pfdp, *npfd_allocp,
npfd, sizeof(**pfdp));
*npfd_allocp = npfd;
}
*npfd_activep = npfd_reserved;
- if (ssh_packet_is_rekeying(ssh))
- return;
-
oalloc = sc->channels_alloc;
channel_handler(ssh, CHAN_PRE, minwait_secs);
-/* $OpenBSD: clientloop.c,v 1.378 2022/01/22 00:49:34 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.379 2022/04/20 04:19:11 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
if (quit_pending)
break;
- /* Do channel operations unless rekeying in progress. */
- if (!ssh_packet_is_rekeying(ssh))
- channel_after_poll(ssh, pfd, npfd_active);
+ /* Do channel operations. */
+ channel_after_poll(ssh, pfd, npfd_active);
/* Buffer input from the connection. */
if (conn_in_ready)
-/* $OpenBSD: serverloop.c,v 1.231 2022/01/22 00:49:34 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.232 2022/04/20 04:19:11 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
cleanup_exit(255);
}
- if (!ssh_packet_is_rekeying(ssh))
- channel_after_poll(ssh, pfd, npfd_active);
+ channel_after_poll(ssh, pfd, npfd_active);
if (conn_in_ready &&
process_input(ssh, connection_in) < 0)
break;