diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-12-29 02:45:07 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-12-29 02:45:07 +1100 |
commit | d6725f04e296135732e9366a762222a3f3fd801f (patch) | |
tree | 6d86f4912d24a648bdef8301a93dd72cda60d6fd /clientloop.c | |
parent | 4abde771b73f3a54780ff3dedf59f57f94298870 (diff) |
- dtucker@cvs.openbsd.org 2007/12/28 15:32:24
[clientloop.c serverloop.c packet.c]
Make SSH2_MSG_UNIMPLEMENTED and SSH2_MSG_IGNORE messages reset the
ServerAlive and ClientAlive timers. Prevents dropping a connection
when these are enabled but the peer does not support our keepalives.
bz #1307, ok djm@.
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clientloop.c b/clientloop.c index ba53de48..38ff614a 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.183 2007/11/03 00:36:14 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.184 2007/12/28 15:32:24 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -465,6 +465,12 @@ client_check_window_change(void) } static void +client_global_keepalive(int type, u_int32_t seq, void *ctxt) +{ + server_alive_timeouts = 0; +} + +static void client_global_request_reply(int type, u_int32_t seq, void *ctxt) { server_alive_timeouts = 0; @@ -2076,6 +2082,8 @@ client_init_dispatch_20(void) /* global request reply messages */ dispatch_set(SSH2_MSG_REQUEST_FAILURE, &client_global_request_reply); dispatch_set(SSH2_MSG_REQUEST_SUCCESS, &client_global_request_reply); + dispatch_set(SSH2_MSG_IGNORE, &client_global_keepalive); + dispatch_set(SSH2_MSG_UNIMPLEMENTED, &client_global_keepalive); } static void client_init_dispatch_13(void) |