Mercurial > dropbear
diff common-channel.c @ 896:a1a97e98b0c1
Read (and enqueue) packets from interactive input even when
we're waiting for a key exchange.
This should hopefully fix the situation where "~." doesn't work to terminate a
client session when a laptop wakes up. The client will be stuck waiting for a
key exchange on a dead connection, so won't have read the escape character
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 17 Feb 2014 21:41:06 +0800 |
parents | 35183e8a7851 |
children | 4696755c4cac |
line wrap: on
line diff
--- a/common-channel.c Sat Feb 15 21:42:35 2014 +0800 +++ b/common-channel.c Mon Feb 17 21:41:06 2014 +0800 @@ -474,8 +474,13 @@ continue; } - /* Stuff to put over the wire */ - if (channel->transwindow > 0) { + /* Stuff to put over the wire. + Avoid queueing data to send if we're in the middle of a + key re-exchange (!dataallowed), but still read from the + FD if there's the possibility of "~."" to kill an + interactive session (the read_mangler) */ + if (channel->transwindow > 0 + && (ses.dataallowed || channel->read_mangler)) { if (channel->readfd >= 0) { FD_SET(channel->readfd, readfds);