diff options
author | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2012-03-24 10:47:16 -0400 |
---|---|---|
committer | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2012-03-24 11:28:41 -0400 |
commit | c51b3b208c228fe6482ef00b3572a19683e7bb98 (patch) | |
tree | d11dd6362bebdcaff1a7516c43372f4c3fff17f6 /tests/test_kex.py | |
parent | 7bcbc2419812f87cf06391da61684df205f131d3 (diff) |
Fix SSHException when re-keying over a fast connection
When Paramiko initiates a re-key request over a high-bandwidth, medium-latency
connection, it erroneously terminates the connection with the error,
"SSHException: Remote transport is ignoring rekey requests". This is due to
the hard-coded limit of 20 packets that may be received after a re-key request
has been sent.
See, for example, this bug report:
"Transfer fails at 1GB: rekey window too small, hard-coded"
https://github.com/paramiko/paramiko/issues/49
This patch changes paramiko's behaviour as follows:
- Decrease the threshold for starting re-keying from 2**30 to 2**29 bytes.
- Decrease the threshold for starting re-keying from 2**30 to 2**29 packets.
- Increase the limit of received packets between re-key request & completion
from 20 packets to 2**29 packets.
- Add a limit of 2**29 received bytes between re-key request & completion.
In other words, we re-key more often in order to allow more data to be
in-transit during re-keying.
NOTE: It looks like Paramiko disables the keep-alive mechanism during
re-keying. This patch does not change that behaviour.
Diffstat (limited to 'tests/test_kex.py')
0 files changed, 0 insertions, 0 deletions