diff options
author | 2007-12-28 15:32:24 +0000 | |
---|---|---|
committer | 2007-12-28 15:32:24 +0000 | |
commit | 20c3e73549a8aa516e3bde3d309d059740c69411 (patch) | |
tree | b79c3dd8603fe7206d7495f5476c5e058c924c29 /usr.bin/ssh/clientloop.c | |
parent | use the snmp camelCase for MIB definitions, this allows to simplify (diff) | |
download | wireguard-openbsd-20c3e73549a8aa516e3bde3d309d059740c69411.tar.xz wireguard-openbsd-20c3e73549a8aa516e3bde3d309d059740c69411.zip |
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 'usr.bin/ssh/clientloop.c')
-rw-r--r-- | usr.bin/ssh/clientloop.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 535a864b726..9379a97bad3 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/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 @@ -457,6 +457,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; @@ -2062,6 +2068,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) |