[sshconnect.c]
sleep before retrying (not after) since sleep changes errno; fixes
pr 5250; rad@twig.com; ok dtucker djm
+ - 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
20061018
- (dtucker) OpenBSD CVS Sync
-/* $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
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 */
-/* $OpenBSD: serverloop.c,v 1.144 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: serverloop.c,v 1.145 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
int channel_id;
/* timeout, check to see how many we have had */
- if (++client_alive_timeouts > options.client_alive_count_max)
- packet_disconnect("Timeout, your session not responding.");
+ if (++client_alive_timeouts > options.client_alive_count_max) {
+ logit("Timeout, client not responding.");
+ cleanup_exit(255);
+ }
/*
* send a bogus global/channel request with "wantreply",