diff options
author | Jonas Gorski <jogo@openwrt.org> | 2014-08-13 20:49:56 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2014-08-13 20:49:56 +0000 |
commit | 8cc51ba777ac3f16d8dab9ecd56420e7a4fa8c43 (patch) | |
tree | 743e2a98f893e8e2f21dc79beedf5824183d307c /package/network/services | |
parent | fa2bcf4fda506fb3191ebb4a90f800dc38c1f72b (diff) | |
download | master-187ad058-8cc51ba777ac3f16d8dab9ecd56420e7a4fa8c43.tar.gz master-187ad058-8cc51ba777ac3f16d8dab9ecd56420e7a4fa8c43.tar.bz2 master-187ad058-8cc51ba777ac3f16d8dab9ecd56420e7a4fa8c43.zip |
dropbear: fix keepalive with putty
Don't send SSH_MSG_UNIMPLEMENTED for keepalive responses, which broke
at least putty.
Fixes #17522 / #17523.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42162 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services')
-rw-r--r-- | package/network/services/dropbear/patches/001-dont_send_SSH_MSG_IMPLEMENTED.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/package/network/services/dropbear/patches/001-dont_send_SSH_MSG_IMPLEMENTED.patch b/package/network/services/dropbear/patches/001-dont_send_SSH_MSG_IMPLEMENTED.patch new file mode 100644 index 0000000000..fe222f5c50 --- /dev/null +++ b/package/network/services/dropbear/patches/001-dont_send_SSH_MSG_IMPLEMENTED.patch @@ -0,0 +1,58 @@ + +# HG changeset patch +# User Matt Johnston <matt@ucc.asn.au> +# Date 1407937727 -28800 +# Node ID f7f6c15b0ec30b0def69c9ccbb3dc4eb97374abc +# Parent 02821319ab1f1208b7ab5de4af82a562c386d40d +Don't send SSH_MSG_UNIMPLEMENTED for keepalive responses + +diff -r 02821319ab1f -r f7f6c15b0ec3 cli-session.c +--- a/cli-session.c Fri Aug 08 21:53:47 2014 +0800 ++++ b/cli-session.c Wed Aug 13 21:48:47 2014 +0800 +@@ -73,6 +73,8 @@ + #ifdef ENABLE_CLI_REMOTETCPFWD + {SSH_MSG_REQUEST_SUCCESS, cli_recv_msg_request_success}, /* client */ + {SSH_MSG_REQUEST_FAILURE, cli_recv_msg_request_failure}, /* client */ ++#else ++ {SSH_MSG_REQUEST_FAILURE, ignore_recv_msg_request_failure}, /* for keepalive */ + #endif + {0, 0} /* End */ + }; +diff -r 02821319ab1f -r f7f6c15b0ec3 common-session.c +--- a/common-session.c Fri Aug 08 21:53:47 2014 +0800 ++++ b/common-session.c Wed Aug 13 21:48:47 2014 +0800 +@@ -394,6 +394,11 @@ + return pos+1; + } + ++void ignore_recv_msg_request_failure() { ++ // Do nothing ++ TRACE(("Ignored msg_request_failure")) ++} ++ + static void send_msg_keepalive() { + CHECKCLEARTOWRITE(); + time_t old_time_idle = ses.last_packet_time_idle; +diff -r 02821319ab1f -r f7f6c15b0ec3 session.h +--- a/session.h Fri Aug 08 21:53:47 2014 +0800 ++++ b/session.h Wed Aug 13 21:48:47 2014 +0800 +@@ -47,6 +47,7 @@ + void session_cleanup(); + void send_session_identification(); + void send_msg_ignore(); ++void ignore_recv_msg_request_failure(); + + void update_channel_prio(); + +diff -r 02821319ab1f -r f7f6c15b0ec3 svr-session.c +--- a/svr-session.c Fri Aug 08 21:53:47 2014 +0800 ++++ b/svr-session.c Wed Aug 13 21:48:47 2014 +0800 +@@ -58,6 +58,7 @@ + {SSH_MSG_CHANNEL_OPEN, recv_msg_channel_open}, + {SSH_MSG_CHANNEL_EOF, recv_msg_channel_eof}, + {SSH_MSG_CHANNEL_CLOSE, recv_msg_channel_close}, ++ {SSH_MSG_REQUEST_FAILURE, ignore_recv_msg_request_failure}, /* for keepalive */ + #ifdef USING_LISTENERS + {SSH_MSG_CHANNEL_OPEN_CONFIRMATION, recv_msg_channel_open_confirmation}, + {SSH_MSG_CHANNEL_OPEN_FAILURE, recv_msg_channel_open_failure}, + |