simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri May 25 21:26:23 BST 2018
TL;DR:
b95a6de Revert premature queuing of channel messages.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2018-05-25 21:26:23
commit b95a6dece62564041e580cd744cdf7c5aed5694c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b95a6dece62564041e580cd744cdf7c5aed5694c;hp=8c7eddc9a122987d8045ae0412954edd59f14ebf
Author: Simon Tatham <anakin at pobox.com>
Date: Fri May 25 21:17:09 2018 +0100
Revert premature queuing of channel messages.
At the point where the do_ssh2_connection coroutine rewrites lots of
dispatch table entries to point to things other than itself, there's a
possibility that it's too late, because some packets of those types
have already arrived and been put into pq_ssh2_connection. So you'd
get weird errors like 'Strange packet received: type 94', in which the
only thing that's strange is why packet 94 might conceivably be
unexpected, since it's SSH_MSG_CHANNEL_DATA!
(I observed this when 'plink host -nc otherhost:port' became a sharing
downstream, but I have no reason to think that's the only circumstance
where this can possibly occur, or even a reliable one. It just
happened to have the right timing.)
I'm not completely sure this is the _best_ solution, but it seems to
work: at the point when I rewrite the dispatch table, I also return
the whole of the connection packet queue to the main queue, so that
it'll be run through the dispatch table a second time which will
effectively filter out any packets that we've just installed new
handlers for.
ssh.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
More information about the tartarus-commits
mailing list