aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-11-02 12:49:03 +0100
committerHans Nilsson <[email protected]>2018-11-07 15:16:37 +0100
commit203d20aeb89e513b71624d0c12952352e6ca3525 (patch)
treee28fab65ef35224dace0a9828ac72e8334b08752
parent1da4135c98d9160d2d890724eb423db1fd1e39a2 (diff)
downloadotp-203d20aeb89e513b71624d0c12952352e6ca3525.tar.gz
otp-203d20aeb89e513b71624d0c12952352e6ca3525.tar.bz2
otp-203d20aeb89e513b71624d0c12952352e6ca3525.zip
ssh: Fix SSH_MSG_EXT_INFO bug for OTP SSH as client
The message could not be received in connected state
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 36152bacf7..84719ebc97 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -952,6 +952,10 @@ handle_event(_, #ssh_msg_userauth_info_request{}, {userauth_keyboard_interactive
%%% ######## {connected, client|server} ####
+%% Skip ext_info messages in connected state (for example from OpenSSH >= 7.7)
+handle_event(_, #ssh_msg_ext_info{}, {connected,_Role}, D) ->
+ {keep_state, D};
+
handle_event(_, {#ssh_msg_kexinit{},_}, {connected,Role}, D0) ->
{KeyInitMsg, SshPacket, Ssh} = ssh_transport:key_exchange_init_msg(D0#data.ssh_params),
D = D0#data{ssh_params = Ssh,