summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-01-02 20:41:03 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-01-02 20:41:03 +0000
commite0d141fb2a53507d746996924c201c3c8c6b1898 (patch)
tree4b71d80713c979640b51aa83206ee4b104089642 /usr.bin
parente01e35fa3d88cbe1f5c30864377862a393ad1ee4 (diff)
log remote ip on disconnect; PR 1600, from jcs@rt.fm
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/packet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 12fb044e031..e5d87eff6bc 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -37,7 +37,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: packet.c,v 1.40 2000/12/19 23:17:57 markus Exp $");
+RCSID("$OpenBSD: packet.c,v 1.41 2001/01/02 20:41:02 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -979,7 +979,8 @@ packet_read_poll(int *payload_len_ptr)
case SSH2_MSG_DISCONNECT:
reason = packet_get_int();
msg = packet_get_string(NULL);
- log("Received disconnect: %d: %.900s", reason, msg);
+ log("Received disconnect from %s: %d: %.400s", get_remote_ipaddr(),
+ reason, msg);
xfree(msg);
fatal_cleanup();
break;
@@ -998,7 +999,8 @@ packet_read_poll(int *payload_len_ptr)
break;
case SSH_MSG_DISCONNECT:
msg = packet_get_string(NULL);
- log("Received disconnect: %.900s", msg);
+ log("Received disconnect from %s: %.400s", get_remote_ipaddr(),
+ msg);
fatal_cleanup();
xfree(msg);
break;