diff options
author | Hans Nilsson <[email protected]> | 2015-04-02 14:53:17 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-04-07 23:02:46 +0200 |
commit | 734506318c49778ff959c0f1f5136543fe8c314b (patch) | |
tree | 9fd1cc0ac599ad464640069750299d9dfa69ae93 /lib/ssh | |
parent | bdd146390f1a69251f386ea86c72fb8859de4ec1 (diff) | |
download | otp-734506318c49778ff959c0f1f5136543fe8c314b.tar.gz otp-734506318c49778ff959c0f1f5136543fe8c314b.tar.bz2 otp-734506318c49778ff959c0f1f5136543fe8c314b.zip |
ssh: fix loop bug for zero maximum_packet_size.
A channel could be opened with the 'max packet size' set to 0. The behaviour is not defined in the ssh rfc:s, and openssh does not handle that case in some special way besides looping.
The introduced solution just "keep quiet" but removes the eternal loop that caused Erlang to core dump.
Diffstat (limited to 'lib/ssh')
-rw-r--r-- | lib/ssh/src/ssh_connection.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl index e9b4547aef..e6f2f12fb7 100644 --- a/lib/ssh/src/ssh_connection.erl +++ b/lib/ssh/src/ssh_connection.erl @@ -1040,6 +1040,9 @@ do_update_send_window(Channel0, Cache) -> get_window(#channel{send_window_size = 0 } = Channel, Acc) -> {lists:reverse(Acc), Channel}; +get_window(#channel{send_packet_size = 0 + } = Channel, Acc) -> + {lists:reverse(Acc), Channel}; get_window(#channel{send_buf = Buffer, send_packet_size = PacketSize, send_window_size = WindowSize0 |