From 5d440cb59bb58d58c171b1235312dd3ea9aaf3f1 Mon Sep 17 00:00:00 2001 From: Kevin Steves Date: Sun, 5 Jul 2009 19:28:34 +0000 Subject: only send SSH2_MSG_DISCONNECT if we're in compat20; from dtucker@ ok deraadt@ markus@ --- usr.bin/ssh/clientloop.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'usr.bin/ssh') 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 * Copyright (c) 1995 Tatu Ylonen , 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(); -- cgit v1.2.3