summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2019-01-19 22:30:52 +0000
committerdjm <djm@openbsd.org>2019-01-19 22:30:52 +0000
commitfc55b228b6d1b4049e5201a2383f5ca02f8ae9f6 (patch)
tree6712ea1abd1c80aa1a8f4deb397d3ae939a3afea /usr.bin/ssh/serverloop.c
parenttypo: "wsdisplay* at simlefb?" -> "wsdisplay* at simplefb?" (diff)
downloadwireguard-openbsd-fc55b228b6d1b4049e5201a2383f5ca02f8ae9f6.tar.xz
wireguard-openbsd-fc55b228b6d1b4049e5201a2383f5ca02f8ae9f6.zip
fix error in refactor: use ssh_packet_disconnect() instead of
sshpkt_error(). The first one logs the error and exits (what we want) instead of just logging and blundering on.
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-rw-r--r--usr.bin/ssh/serverloop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 2f38e54ae0a..f1820f74e4b 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.212 2019/01/19 21:43:56 djm Exp $ */
+/* $OpenBSD: serverloop.c,v 1.213 2019/01/19 22:30:52 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -632,7 +632,7 @@ server_request_session(struct ssh *ssh)
sshpkt_fatal(ssh, r, "%s: parse packet", __func__);
if (no_more_sessions) {
- sshpkt_disconnect(ssh, "Possible attack: attempt to open a "
+ ssh_packet_disconnect(ssh, "Possible attack: attempt to open a "
"session after additional sessions disabled");
}
@@ -918,8 +918,10 @@ server_input_channel_req(int type, u_int32_t seq, struct ssh *ssh)
debug("server_input_channel_req: channel %u request %s reply %d",
id, rtype, want_reply);
- if (id >= INT_MAX || (c = channel_lookup(ssh, (int)id)) == NULL)
- sshpkt_disconnect(ssh, "%s: unknown channel %d", __func__, id);
+ if (id >= INT_MAX || (c = channel_lookup(ssh, (int)id)) == NULL) {
+ ssh_packet_disconnect(ssh, "%s: unknown channel %d",
+ __func__, id);
+ }
if (!strcmp(rtype, "eow@openssh.com")) {
if ((r = sshpkt_get_end(ssh)) != 0)
sshpkt_fatal(ssh, r, "%s: parse packet", __func__);