From: Jonas Gorski Date: Wed, 13 Aug 2014 20:49:56 +0000 (+0000) Subject: dropbear: fix keepalive with putty X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=006cdbfdbcb28e32bf336eafd66d5aeba4c45e15;p=librecmc%2Flibrecmc.git 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 SVN-Revision: 42162 --- 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 +# 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}, +