summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-10-24 03:02:41 +1000
committerDamien Miller <djm@mindrot.org>2006-10-24 03:02:41 +1000
commit985a4485f57af55cd8f097ab437fdf87c365ea96 (patch)
tree4b92d3258e969d0742120e1315f5b18a028e25f8
parentf4bcd10c4c9b53e7c0c2821825addaf3a13d7c1a (diff)
- markus@cvs.openbsd.org 2006/10/11 12:38:03
[clientloop.c serverloop.c] 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
-rw-r--r--ChangeLog7
-rw-r--r--clientloop.c8
-rw-r--r--serverloop.c8
3 files changed, 16 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b752ca54..e6b71615c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,11 @@
17 [sshconnect.c] 17 [sshconnect.c]
18 sleep before retrying (not after) since sleep changes errno; fixes 18 sleep before retrying (not after) since sleep changes errno; fixes
19 pr 5250; rad@twig.com; ok dtucker djm 19 pr 5250; rad@twig.com; ok dtucker djm
20 - markus@cvs.openbsd.org 2006/10/11 12:38:03
21 [clientloop.c serverloop.c]
22 exit instead of doing a blocking tcp send if we detect a client/server
23 timeout, since the tcp sendqueue might be already full (of alive
24 requests); ok dtucker, report mpf
20 25
2120061018 2620061018
22 - (dtucker) OpenBSD CVS Sync 27 - (dtucker) OpenBSD CVS Sync
@@ -2558,4 +2563,4 @@
2558 OpenServer 6 and add osr5bigcrypt support so when someone migrates 2563 OpenServer 6 and add osr5bigcrypt support so when someone migrates
2559 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 2564 passwords between UnixWare and OpenServer they will still work. OK dtucker@
2560 2565
2561$Id: ChangeLog,v 1.4576 2006/10/23 17:02:23 djm Exp $ 2566$Id: ChangeLog,v 1.4577 2006/10/23 17:02:41 djm Exp $
diff --git a/clientloop.c b/clientloop.c
index 88dfb1f32..4c5108199 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.175 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.176 2006/10/11 12:38:03 markus 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
@@ -464,8 +464,10 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt)
464static void 464static void
465server_alive_check(void) 465server_alive_check(void)
466{ 466{
467 if (++server_alive_timeouts > options.server_alive_count_max) 467 if (++server_alive_timeouts > options.server_alive_count_max) {
468 packet_disconnect("Timeout, server not responding."); 468 logit("Timeout, server not responding.");
469 cleanup_exit(255);
470 }
469 packet_start(SSH2_MSG_GLOBAL_REQUEST); 471 packet_start(SSH2_MSG_GLOBAL_REQUEST);
470 packet_put_cstring("keepalive@openssh.com"); 472 packet_put_cstring("keepalive@openssh.com");
471 packet_put_char(1); /* boolean: want reply */ 473 packet_put_char(1); /* boolean: want reply */
diff --git a/serverloop.c b/serverloop.c
index 6e5fdc2d8..69304b5fa 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.144 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.145 2006/10/11 12:38:03 markus 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
@@ -248,8 +248,10 @@ client_alive_check(void)
248 int channel_id; 248 int channel_id;
249 249
250 /* timeout, check to see how many we have had */ 250 /* timeout, check to see how many we have had */
251 if (++client_alive_timeouts > options.client_alive_count_max) 251 if (++client_alive_timeouts > options.client_alive_count_max) {
252 packet_disconnect("Timeout, your session not responding."); 252 logit("Timeout, client not responding.");
253 cleanup_exit(255);
254 }
253 255
254 /* 256 /*
255 * send a bogus global/channel request with "wantreply", 257 * send a bogus global/channel request with "wantreply",