summaryrefslogtreecommitdiff
path: root/tests/test_transport.py
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2014-12-14 00:05:39 -0800
committerJeff Forcier <jeff@bitprophet.org>2014-12-17 16:04:25 -0800
commit6b7d45f2c87c993b7944e7526b184290314d7f9b (patch)
treed161a73690f9f7e1cfd387b4ba192be4ecbfaff1 /tests/test_transport.py
parent25e3c0c34e98b50f429a2e72ecc059d469dc1168 (diff)
downloadparamiko-6b7d45f2c87c993b7944e7526b184290314d7f9b.tar.gz
Suggest a MIN_WINDOW_SIZE and MIN_PACKET_SIZE
Not fully confident with this change, though I will describe my findings fully in the pull request. The OpenSSH client requests a maximum packet size of 16384, but this MIN_PACKET_SIZE value of 32768 causes its request to be "clamped" up to 32768, later causing an error to stderr on the OpenSSH client. Suggest then, to delineate MIN_WINDOW_SIZE from MIN_PACKET_SIZE, as they are applied. I don't think there is any minimum value of MIN_PACKET_SIZE, however we can suggest a value of 4096 for now.
Diffstat (limited to 'tests/test_transport.py')
-rw-r--r--tests/test_transport.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py
index dd522c4e..5cf9a867 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -35,7 +35,7 @@ from paramiko import Transport, SecurityOptions, ServerInterface, RSAKey, DSSKey
from paramiko import AUTH_FAILED, AUTH_SUCCESSFUL
from paramiko import OPEN_SUCCEEDED, OPEN_FAILED_ADMINISTRATIVELY_PROHIBITED
from paramiko.common import MSG_KEXINIT, cMSG_CHANNEL_WINDOW_ADJUST, \
- MIN_PACKET_SIZE, MAX_WINDOW_SIZE, \
+ MIN_PACKET_SIZE, MIN_WINDOW_SIZE, MAX_WINDOW_SIZE, \
DEFAULT_WINDOW_SIZE, DEFAULT_MAX_PACKET_SIZE
from paramiko.py3compat import bytes
from paramiko.message import Message
@@ -779,7 +779,7 @@ class TransportTest(unittest.TestCase):
"""
verify that we conform to the rfc of packet and window sizes.
"""
- for val, correct in [(32767, MIN_PACKET_SIZE),
+ for val, correct in [(4095, MIN_PACKET_SIZE),
(None, DEFAULT_MAX_PACKET_SIZE),
(2**32, MAX_WINDOW_SIZE)]:
self.assertEqual(self.tc._sanitize_packet_size(val), correct)
@@ -788,7 +788,7 @@ class TransportTest(unittest.TestCase):
"""
verify that we conform to the rfc of packet and window sizes.
"""
- for val, correct in [(32767, MIN_PACKET_SIZE),
+ for val, correct in [(32767, MIN_WINDOW_SIZE),
(None, DEFAULT_WINDOW_SIZE),
(2**32, MAX_WINDOW_SIZE)]:
self.assertEqual(self.tc._sanitize_window_size(val), correct)