aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2013-06-28 10:50:01 +0200
committerErlang/OTP <[email protected]>2013-06-28 10:50:01 +0200
commit0b98592101e2f577758166d0b7e1e0887ab4020c (patch)
treeb0639153f28155d3e9c54fb8963a0241bc11567d
parenta2e2e18a2ee5164d1fe16f524acaa11f73d2e025 (diff)
parent8f5992f826b86e5a4f28a8feae10a6a678f07065 (diff)
downloadotp-0b98592101e2f577758166d0b7e1e0887ab4020c.tar.gz
otp-0b98592101e2f577758166d0b7e1e0887ab4020c.tar.bz2
otp-0b98592101e2f577758166d0b7e1e0887ab4020c.zip
Merge branch 'fredrik/ssh/error_disconnect/OTP-11188' into maint-r15
* fredrik/ssh/error_disconnect/OTP-11188: ssh: version updates ssh: fixed bad match failure when disconnect msg
-rw-r--r--lib/ssh/src/ssh.appup.src2
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl14
-rw-r--r--lib/ssh/vsn.mk2
3 files changed, 13 insertions, 5 deletions
diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src
index d99931c746..08851dc445 100644
--- a/lib/ssh/src/ssh.appup.src
+++ b/lib/ssh/src/ssh.appup.src
@@ -19,12 +19,14 @@
{"%VSN%",
[
+ {<<"2.1.2">>, [{restart_application, ssh}]},
{<<"2.1.1">>, [{restart_application, ssh}]},
{<<"2.1">>, [{restart_application, ssh}]},
{<<"2.0\\.*">>, [{restart_application, ssh}]},
{<<"1\\.*">>, [{restart_application, ssh}]}
],
[
+ {<<"2.1.2">>, [{restart_application, ssh}]},
{<<"2.1.1">>, [{restart_application, ssh}]},
{<<"2.1">>,[{restart_application, ssh}]},
{<<"2.0\\.*">>, [{restart_application, ssh}]},
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index d8950a7b67..0ec0424f74 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -419,10 +419,16 @@ userauth(#ssh_msg_userauth_failure{authentications = Methodes},
#state{ssh_params = #ssh{role = client,
userauth_methods = none} = Ssh0} = State) ->
AuthMethods = string:tokens(Methodes, ","),
- {Msg, Ssh} = ssh_auth:userauth_request_msg(
- Ssh0#ssh{userauth_methods = AuthMethods}),
- send_msg(Msg, State),
- {next_state, userauth, next_packet(State#state{ssh_params = Ssh})};
+ case ssh_auth:userauth_request_msg(
+ Ssh0#ssh{userauth_methods = AuthMethods}) of
+ {disconnect, DisconnectMsg,{Msg, Ssh}} ->
+ send_msg(Msg, State),
+ handle_disconnect(DisconnectMsg, State#state{ssh_params = Ssh});
+ {Msg, Ssh} ->
+ send_msg(Msg, State),
+ {next_state, userauth, next_packet(State#state{ssh_params = Ssh})}
+ end;
+
%% The prefered authentication method failed try next method
userauth(#ssh_msg_userauth_failure{},
diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk
index 921ec2206a..37353707c2 100644
--- a/lib/ssh/vsn.mk
+++ b/lib/ssh/vsn.mk
@@ -1,5 +1,5 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
-SSH_VSN = 2.1.2
+SSH_VSN = 2.1.2.1
APP_VSN = "ssh-$(SSH_VSN)"