summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2008-02-10 22:27:47 +1100
committerDamien Miller <djm@mindrot.org>2008-02-10 22:27:47 +1100
commit5ed3d575f90cb62979e25c611da29e08069f1006 (patch)
treef9cfbc8edcb230ce3ffd9a5f8322194d4e8a10a4
parentacdf25b31f02c010ed2b5f655bbae0f5b75f07f6 (diff)
- dtucker@cvs.openbsd.org 2008/01/23 01:56:54
[clientloop.c packet.c serverloop.c] Revert the change for bz #1307 as it causes connection aborts if an IGNORE packet arrives while we're waiting in packet_read_expect (and possibly elsewhere).
-rw-r--r--ChangeLog7
-rw-r--r--clientloop.c10
-rw-r--r--packet.c13
-rw-r--r--serverloop.c4
4 files changed, 15 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index dfda7a5d5..d6655ba1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,11 @@
58 [sftp-client.c] 58 [sftp-client.c]
59 when a remote write error occurs during an upload, ensure that ACKs for 59 when a remote write error occurs during an upload, ensure that ACKs for
60 all issued requests are properly drained. patch from t8m AT centrum.cz 60 all issued requests are properly drained. patch from t8m AT centrum.cz
61 - dtucker@cvs.openbsd.org 2008/01/23 01:56:54
62 [clientloop.c packet.c serverloop.c]
63 Revert the change for bz #1307 as it causes connection aborts if an IGNORE
64 packet arrives while we're waiting in packet_read_expect (and possibly
65 elsewhere).
61 66
6220080119 6720080119
63 - (djm) Silence noice from expr in ssh-copy-id; patch from 68 - (djm) Silence noice from expr in ssh-copy-id; patch from
@@ -3586,4 +3591,4 @@
3586 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3591 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3587 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3592 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3588 3593
3589$Id: ChangeLog,v 1.4831 2008/02/10 11:27:24 djm Exp $ 3594$Id: ChangeLog,v 1.4832 2008/02/10 11:27:47 djm Exp $
diff --git a/clientloop.c b/clientloop.c
index 195615063..d3fdc2bfc 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.186 2008/01/19 20:48:53 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.187 2008/01/23 01:56:54 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,12 +465,6 @@ 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
474client_global_request_reply(int type, u_int32_t seq, void *ctxt) 468client_global_request_reply(int type, u_int32_t seq, void *ctxt)
475{ 469{
476 server_alive_timeouts = 0; 470 server_alive_timeouts = 0;
@@ -2083,8 +2077,6 @@ client_init_dispatch_20(void)
2083 /* global request reply messages */ 2077 /* global request reply messages */
2084 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &client_global_request_reply); 2078 dispatch_set(SSH2_MSG_REQUEST_FAILURE, &client_global_request_reply);
2085 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &client_global_request_reply); 2079 dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &client_global_request_reply);
2086 dispatch_set(SSH2_MSG_IGNORE, &client_global_keepalive);
2087 dispatch_set(SSH2_MSG_UNIMPLEMENTED, &client_global_keepalive);
2088} 2080}
2089static void 2081static void
2090client_init_dispatch_13(void) 2082client_init_dispatch_13(void)
diff --git a/packet.c b/packet.c
index 561fbf4c9..92997288d 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.149 2007/12/28 15:32:24 dtucker Exp $ */ 1/* $OpenBSD: packet.c,v 1.150 2008/01/23 01:56:54 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,10 +968,9 @@ 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, SSH_MSG_IGNORE 971 * SSH_MSG_DISCONNECT is handled specially here. Also,
972 * messages are skipped by this function and are never returned 972 * SSH_MSG_IGNORE messages are skipped by this function and are never returned
973 * to higher levels, although SSH2_MSG_IGNORE are since they are needed 973 * to higher levels.
974 * for keepalives.
975 */ 974 */
976 975
977static int 976static int
@@ -1196,6 +1195,8 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1196 if (type) 1195 if (type)
1197 DBG(debug("received packet type %d", type)); 1196 DBG(debug("received packet type %d", type));
1198 switch (type) { 1197 switch (type) {
1198 case SSH2_MSG_IGNORE:
1199 break;
1199 case SSH2_MSG_DEBUG: 1200 case SSH2_MSG_DEBUG:
1200 packet_get_char(); 1201 packet_get_char();
1201 msg = packet_get_string(NULL); 1202 msg = packet_get_string(NULL);
@@ -1216,7 +1217,7 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p)
1216 seqnr = packet_get_int(); 1217 seqnr = packet_get_int();
1217 debug("Received SSH2_MSG_UNIMPLEMENTED for %u", 1218 debug("Received SSH2_MSG_UNIMPLEMENTED for %u",
1218 seqnr); 1219 seqnr);
1219 /* FALLTHROUGH */ 1220 break;
1220 default: 1221 default:
1221 return type; 1222 return type;
1222 } 1223 }
diff --git a/serverloop.c b/serverloop.c
index 81888d0e5..124d86c6e 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.146 2007/12/28 15:32:24 dtucker Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.147 2008/01/23 01:56:54 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,8 +1193,6 @@ 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);
1198 /* rekeying */ 1196 /* rekeying */
1199 dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit); 1197 dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
1200} 1198}