summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/packet.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2017-12-10 05:55:30 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2017-12-10 05:55:30 +0000
commit6c1f1de9304d94011cb5198391e43ec35316eae5 (patch)
tree80589b9f644862e0912ec8c195d8f714a543b23d /usr.bin/ssh/packet.c
parentd643d51e0a0e6162317011bbdbc7ef92ba79000e (diff)
Put remote client info back into the ClientAlive connection termination
message. Based in part on diff from lars.nooden at gmail, ok djm
Diffstat (limited to 'usr.bin/ssh/packet.c')
-rw-r--r--usr.bin/ssh/packet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 8ce7db0584a..039359eb546 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.267 2017/11/25 06:46:22 dtucker Exp $ */
+/* $OpenBSD: packet.c,v 1.268 2017/12/10 05:55:29 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1785,8 +1785,8 @@ ssh_packet_send_debug(struct ssh *ssh, const char *fmt,...)
fatal("%s: %s", __func__, ssh_err(r));
}
-static void
-fmt_connection_id(struct ssh *ssh, char *s, size_t l)
+void
+sshpkt_fmt_connection_id(struct ssh *ssh, char *s, size_t l)
{
snprintf(s, l, "%.200s%s%s port %d",
ssh->log_preamble ? ssh->log_preamble : "",
@@ -1802,7 +1802,7 @@ sshpkt_fatal(struct ssh *ssh, const char *tag, int r)
{
char remote_id[512];
- fmt_connection_id(ssh, remote_id, sizeof(remote_id));
+ sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
switch (r) {
case SSH_ERR_CONN_CLOSED:
@@ -1864,7 +1864,7 @@ ssh_packet_disconnect(struct ssh *ssh, const char *fmt,...)
* Format the message. Note that the caller must make sure the
* message is of limited size.
*/
- fmt_connection_id(ssh, remote_id, sizeof(remote_id));
+ sshpkt_fmt_connection_id(ssh, remote_id, sizeof(remote_id));
va_start(args, fmt);
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);