summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-05-10 13:41:33 +1000
committerDamien Miller <djm@mindrot.org>2013-05-10 13:41:33 +1000
commitf1d2496aac4bc12e7376e56eeaf520af699ffd3c (patch)
treee2a9781aeadc3bb78bdf9b77443d8cc258343a82
parent31859a046f4b4888c9b34b035ab3485721a8ce18 (diff)
- djm@cvs.openbsd.org 2013/04/11 02:27:50
[packet.c] quiet disconnect notifications on the server from error() back to logit() if it is a normal client closure; bz#2057 ok+feedback dtucker@
-rw-r--r--ChangeLog7
-rw-r--r--packet.c8
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bb462a9..bf546c0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+20130510
+ - (djm) OpenBSD CVS Cherrypick
+ - djm@cvs.openbsd.org 2013/04/11 02:27:50
+ [packet.c]
+ quiet disconnect notifications on the server from error() back to logit()
+ if it is a normal client closure; bz#2057 ok+feedback dtucker@
+
20130404
- (dtucker) OpenBSD CVS Sync
- dtucker@cvs.openbsd.org 2013/02/17 23:16:57
diff --git a/packet.c b/packet.c
index 9326ddea..3e835d36 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.181 2013/02/10 23:35:24 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.182 2013/04/11 02:27:50 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -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_INFO : SYSLOG_LEVEL_ERROR,
+ "Received disconnect from %s: %u: %.400s",
get_remote_ipaddr(), reason, msg);
xfree(msg);
cleanup_exit(255);