diff cli-session.c @ 970:0bb16232e7c4

Make keepalive handling more robust, this should now match what OpenSSH does
author Matt Johnston <matt@ucc.asn.au>
date Tue, 19 Aug 2014 23:08:56 +0800
parents f7f6c15b0ec3
children 73ea0dce9a57 02baa0b334e8 38d2f6b2d1b8
line wrap: on
line diff
--- a/cli-session.c	Wed Aug 13 22:07:43 2014 +0800
+++ b/cli-session.c	Tue Aug 19 23:08:56 2014 +0800
@@ -70,11 +70,15 @@
 	{SSH_MSG_USERAUTH_BANNER, recv_msg_userauth_banner}, /* client */
 	{SSH_MSG_USERAUTH_SPECIFIC_60, recv_msg_userauth_specific_60}, /* client */
 	{SSH_MSG_GLOBAL_REQUEST, recv_msg_global_request_cli},
+	{SSH_MSG_CHANNEL_SUCCESS, ignore_recv_response},
+	{SSH_MSG_CHANNEL_FAILURE, ignore_recv_response},
 #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 */
+	/* For keepalive */
+	{SSH_MSG_REQUEST_SUCCESS, ignore_recv_response},
+	{SSH_MSG_REQUEST_FAILURE, ignore_recv_response},
 #endif
 	{0, 0} /* End */
 };