summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-05-15 13:48:49 +1000
committerDamien Miller <djm@mindrot.org>2014-05-15 13:48:49 +1000
commitc5893785564498cea73cb60d2cf199490483e080 (patch)
treefe539bd8702dcad444521c656dce2aa8ea65d483 /serverloop.c
parent633de33b192d808d87537834c316dc8b75fe1880 (diff)
- djm@cvs.openbsd.org 2014/04/29 13:10:30
[clientloop.c serverloop.c] bz#1818 - don't send channel success/failre replies on channels that have sent a close already; analysis and patch from Simon Tatham; ok markus@
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c
index 2f8e3a06a..6c4b2b512 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.170 2014/02/02 03:44:31 djm Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.171 2014/04/29 13:10:30 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1204,7 +1204,7 @@ server_input_channel_req(int type, u_int32_t seq, void *ctxt)
1204 } else if ((c->type == SSH_CHANNEL_LARVAL || 1204 } else if ((c->type == SSH_CHANNEL_LARVAL ||
1205 c->type == SSH_CHANNEL_OPEN) && strcmp(c->ctype, "session") == 0) 1205 c->type == SSH_CHANNEL_OPEN) && strcmp(c->ctype, "session") == 0)
1206 success = session_input_channel_req(c, rtype); 1206 success = session_input_channel_req(c, rtype);
1207 if (reply) { 1207 if (reply && !(c->flags & CHAN_CLOSE_SENT)) {
1208 packet_start(success ? 1208 packet_start(success ?
1209 SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); 1209 SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE);
1210 packet_put_int(c->remote_id); 1210 packet_put_int(c->remote_id);