summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2006-10-11 12:38:03 +0000
committermarkus <markus@openbsd.org>2006-10-11 12:38:03 +0000
commit06fed5d93b2dc6e4ab327f9f97feaeef0cc91d90 (patch)
tree3b51486f1124352f60dafc4eff153505aa59d502 /usr.bin/ssh/clientloop.c
parentSIGCONT may be sent to any process with the same session ID as the caller, (diff)
downloadwireguard-openbsd-06fed5d93b2dc6e4ab327f9f97feaeef0cc91d90.tar.xz
wireguard-openbsd-06fed5d93b2dc6e4ab327f9f97feaeef0cc91d90.zip
exit instead of doing a blocking tcp send if we detect a client/server timeout,
since the tcp sendqueue might be already full (of alive requests); ok dtucker, report mpf
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 8c891058f72..acfb8753e38 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.175 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: clientloop.c,v 1.176 2006/10/11 12:38:03 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -456,8 +456,10 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt)
static void
server_alive_check(void)
{
- if (++server_alive_timeouts > options.server_alive_count_max)
- packet_disconnect("Timeout, server not responding.");
+ if (++server_alive_timeouts > options.server_alive_count_max) {
+ logit("Timeout, server not responding.");
+ cleanup_exit(255);
+ }
packet_start(SSH2_MSG_GLOBAL_REQUEST);
packet_put_cstring("keepalive@openssh.com");
packet_put_char(1); /* boolean: want reply */