diff options
author | Matt Johnston <matt@ucc.asn.au> | 2014-02-17 21:41:06 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2014-02-17 21:41:06 +0800 |
commit | bf6f3f613d487299df5e2570984c22ad72908c28 (patch) | |
tree | c8cebde88c618edf76e231cbd0d7c19fade00a2e /common-channel.c | |
parent | 0c9a643216e330911917fb1837747456d49a80b2 (diff) |
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
Diffstat (limited to 'common-channel.c')
-rw-r--r-- | common-channel.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common-channel.c b/common-channel.c index 2068904..4a6bdb4 100644 --- a/common-channel.c +++ b/common-channel.c @@ -474,8 +474,13 @@ void setchannelfds(fd_set *readfds, fd_set *writefds) { 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); |