summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authorstevesk <stevesk@openbsd.org>2009-07-05 19:28:33 +0000
committerstevesk <stevesk@openbsd.org>2009-07-05 19:28:33 +0000
commitdfd6b8d40659f4481a1b0dca274062cc0ff7f04a (patch)
treeb22feb5802ac442c3befa33ce5abed1c979c7657 /usr.bin/ssh/clientloop.c
parentMake sure the OpenBSD bounds exclude the first cylinder, which is used (diff)
downloadwireguard-openbsd-dfd6b8d40659f4481a1b0dca274062cc0ff7f04a.tar.xz
wireguard-openbsd-dfd6b8d40659f4481a1b0dca274062cc0ff7f04a.zip
only send SSH2_MSG_DISCONNECT if we're in compat20; from dtucker@
ok deraadt@ markus@
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 2b2007443aa..0cad484af72 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.212 2009/05/28 16:50:16 andreas Exp $ */
+/* $OpenBSD: clientloop.c,v 1.213 2009/07/05 19:28:33 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1465,11 +1465,13 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
/* Stop watching for window change. */
signal(SIGWINCH, SIG_DFL);
- packet_start(SSH2_MSG_DISCONNECT);
- packet_put_int(SSH2_DISCONNECT_BY_APPLICATION);
- packet_put_cstring("disconnected by user");
- packet_send();
- packet_write_wait();
+ if (compat20) {
+ packet_start(SSH2_MSG_DISCONNECT);
+ packet_put_int(SSH2_DISCONNECT_BY_APPLICATION);
+ packet_put_cstring("disconnected by user");
+ packet_send();
+ packet_write_wait();
+ }
channel_free_all();