aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-03-01 18:41:59 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2010-03-01 18:41:59 +0100
commit56dfa69fc97077779591374f2c6faa1b0a5c3e03 (patch)
tree1afc93ea45a2300dbe9f2247d108d03c3e7cf335
parent672f8412f0790d48df0120fbc74ab4ca81af7ba1 (diff)
downloadlibssh-56dfa69fc97077779591374f2c6faa1b0a5c3e03.tar.gz
libssh-56dfa69fc97077779591374f2c6faa1b0a5c3e03.tar.xz
libssh-56dfa69fc97077779591374f2c6faa1b0a5c3e03.zip
Send back replies to openssh's keepalives
-rw-r--r--libssh/channels.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index a046e89f..b976b718 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -552,6 +552,15 @@ static void channel_rcv_request(ssh_session session) {
return;
}
+ if(strcmp(request,"keepalive@openssh.com")==0){
+ SAFE_FREE(request);
+ ssh_log(session, SSH_LOG_PROTOCOL,"Responding to Openssh's keepalive");
+ buffer_add_u8(session->out_buffer, SSH2_MSG_CHANNEL_SUCCESS);
+ buffer_add_u32(session->out_buffer, htonl(channel->remote_channel));
+ packet_send(session);
+ leave_function();
+ return;
+ }
/* TODO call message_handle since it handles channel requests as messages */
/* *but* reset buffer before !! */