summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--clientloop.c10
-rw-r--r--packet.c13
-rw-r--r--serverloop.c4
4 files changed, 25 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b8dec756..f583bc7ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,12 @@
10 Add a small helper function to consistently handle the EAI_SYSTEM error 10 Add a small helper function to consistently handle the EAI_SYSTEM error
11 code of getaddrinfo. Prompted by vgiffin at apple com via bz #1417. 11 code of getaddrinfo. Prompted by vgiffin at apple com via bz #1417.
12 ok markus@ stevesk@ 12 ok markus@ stevesk@
13 - dtucker@cvs.openbsd.org 2007/12/28 15:32:24
14 [clientloop.c serverloop.c packet.c]
15 Make SSH2_MSG_UNIMPLEMENTED and SSH2_MSG_IGNORE messages reset the
16 ServerAlive and ClientAlive timers. Prevents dropping a connection
17 when these are enabled but the peer does not support our keepalives.
18 bz #1307, ok djm@.
13 19
1420071202 2020071202
15 - (dtucker) [configure.ac] Enable -fstack-protector-all on systems where 21 - (dtucker) [configure.ac] Enable -fstack-protector-all on systems where
@@ -3471,4 +3477,4 @@
3471 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3477 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3472 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3478 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3473 3479
3474$Id: ChangeLog,v 1.4808 2007/12/28 15:43:51 dtucker Exp $ 3480$Id: ChangeLog,v 1.4809 2007/12/28 15:45:07 dtucker Exp $
diff --git a/clientloop.c b/clientloop.c
index ba53de483..38ff614a9 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.183 2007/11/03 00:36:14 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.184 2007/12/28 15:32:24 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -465,6 +465,12 @@ client_check_window_change(void)
465} 465}
466 466
467static void 467static void
468client_global_keepalive(int type, u_int32_t seq, void *ctxt)
469{
470 server_alive_timeouts = 0;
471}
472
473static void
468client_global_request_reply(int type, u_int32_t seq, void *ctxt) 474client_global_request_reply(int type, u_int32_t seq, void *ctxt)
469{ 475{
470 server_alive_timeouts = 0; 476 server_alive_timeouts = 0;
@@ -2076,6 +2082,8 @@ client_init_dispatch_20(void)
2076 /* global request reply messages */ 2082 /* global request reply messages */
2077 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &client_global_request_reply); 2083 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &client_global_request_reply);
2078 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &client_global_request_reply); 2084 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &client_global_request_reply);
2085 dispatch_set(SSH2_MSG_IGNORE, &client_global_keepalive);
2086 dispatch_set(SSH2_MSG_UNIMPLEMENTED, &client_global_keepalive);
2079} 2087}
2080static void 2088static void
2081client_init_dispatch_13(void) 2089client_init_dispatch_13(void)
diff --git a/packet.c b/packet.c
index f82a63c47..561fbf4c9 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.148 2007/06/07 19:37:34 pvalchev Exp $ */ 1/* $OpenBSD: packet.c,v 1.149 2007/12/28 15:32:24 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -968,9 +968,10 @@ packet_read_expect(int expected_type)
968 * packet_process_incoming. If so, reads the packet; otherwise returns 968 * packet_process_incoming. If so, reads the packet; otherwise returns
969 * SSH_MSG_NONE. This does not wait for data from the connection. 969 * SSH_MSG_NONE. This does not wait for data from the connection.
970 * 970 *
971 * SSH_MSG_DISCONNECT is handled specially here. Also, 971 * SSH_MSG_DISCONNECT is handled specially here. Also, SSH_MSG_IGNORE
972 * SSH_MSG_IGNORE messages are skipped by this function and are never returned 972 * messages are skipped by this function and are never returned
973 * to higher levels. 973 * to higher levels, although SSH2_MSG_IGNORE are since they are needed
974 * for keepalives.
974 */ 975 */
975 976
976static int 977static int
@@ -1195,8 +1196,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1195 if (type) 1196 if (type)
1196 DBG(debug("received packet type %d", type)); 1197 DBG(debug("received packet type %d", type));
1197 switch (type) { 1198 switch (type) {
1198 case SSH2_MSG_IGNORE:
1199 break;
1200 case SSH2_MSG_DEBUG: 1199 case SSH2_MSG_DEBUG:
1201 packet_get_char(); 1200 packet_get_char();
1202 msg = packet_get_string(NULL); 1201 msg = packet_get_string(NULL);
@@ -1217,7 +1216,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1217 seqnr = packet_get_int(); 1216 seqnr = packet_get_int();
1218 debug("Received SSH2_MSG_UNIMPLEMENTED for %u", 1217 debug("Received SSH2_MSG_UNIMPLEMENTED for %u",
1219 seqnr); 1218 seqnr);
1220 break; 1219 /* FALLTHROUGH */
1221 default: 1220 default:
1222 return type; 1221 return type;
1223 } 1222 }
diff --git a/serverloop.c b/serverloop.c
index 7e373f01b..81888d0e5 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.145 2006/10/11 12:38:03 markus Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.146 2007/12/28 15:32:24 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1193,6 +1193,8 @@ server_init_dispatch_20(void)
1193 dispatch_set(SSH2_MSG_CHANNEL_FAILURE, &server_input_keep_alive); 1193 dispatch_set(SSH2_MSG_CHANNEL_FAILURE, &server_input_keep_alive);
1194 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &server_input_keep_alive); 1194 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &server_input_keep_alive);
1195 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &server_input_keep_alive); 1195 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &server_input_keep_alive);
1196 dispatch_set(SSH2_MSG_IGNORE, &server_input_keep_alive);
1197 dispatch_set(SSH2_MSG_UNIMPLEMENTED, &server_input_keep_alive);
1196 /* rekeying */ 1198 /* rekeying */
1197 dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); 1199 dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
1198} 1200}