From f74399985cb95da0afe370a71979d6c243038f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sun, 14 Apr 2013 12:55:39 +0000 Subject: [PATCH] Apply a patch from OpenSSH bugzilla #2057 to silence "received disconnect" errors in the common case (i.e. client intentionally disconnected). --- packet.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packet.c b/packet.c index 9326ddea6d64..3f111ed93cde 100644 --- a/packet.c +++ b/packet.c @@ -1460,7 +1460,11 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p) case SSH2_MSG_DISCONNECT: reason = packet_get_int(); msg = packet_get_string(NULL); - error("Received disconnect from %s: %u: %.400s", + /* Ignore normal client exit notifications */ + do_log2(active_state->server_side && + reason == SSH2_DISCONNECT_BY_APPLICATION ? + SYSLOG_LEVEL_DEBUG1 : SYSLOG_LEVEL_ERROR, + "Received disconnect from %s: %u: %.400s", get_remote_ipaddr(), reason, msg); xfree(msg); cleanup_exit(255);