diff options
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/serverloop.c b/serverloop.c index 567159410..ae75fc2ec 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: serverloop.c,v 1.197 2017/09/12 06:32:07 djm Exp $ */ | 1 | /* $OpenBSD: serverloop.c,v 1.198 2017/09/12 06:35:32 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 |
@@ -619,6 +619,7 @@ server_input_channel_open(int type, u_int32_t seq, struct ssh *ssh) | |||
619 | if (c != NULL) { | 619 | if (c != NULL) { |
620 | debug("server_input_channel_open: confirm %s", ctype); | 620 | debug("server_input_channel_open: confirm %s", ctype); |
621 | c->remote_id = rchan; | 621 | c->remote_id = rchan; |
622 | c->have_remote_id = 1; | ||
622 | c->remote_window = rwindow; | 623 | c->remote_window = rwindow; |
623 | c->remote_maxpacket = rmaxpack; | 624 | c->remote_maxpacket = rmaxpack; |
624 | if (c->type != SSH_CHANNEL_CONNECTING) { | 625 | if (c->type != SSH_CHANNEL_CONNECTING) { |
@@ -844,6 +845,9 @@ server_input_channel_req(int type, u_int32_t seq, struct ssh *ssh) | |||
844 | c->type == SSH_CHANNEL_OPEN) && strcmp(c->ctype, "session") == 0) | 845 | c->type == SSH_CHANNEL_OPEN) && strcmp(c->ctype, "session") == 0) |
845 | success = session_input_channel_req(ssh, c, rtype); | 846 | success = session_input_channel_req(ssh, c, rtype); |
846 | if (reply && !(c->flags & CHAN_CLOSE_SENT)) { | 847 | if (reply && !(c->flags & CHAN_CLOSE_SENT)) { |
848 | if (!c->have_remote_id) | ||
849 | fatal("%s: channel %d: no remote_id", | ||
850 | __func__, c->self); | ||
847 | packet_start(success ? | 851 | packet_start(success ? |
848 | SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); | 852 | SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE); |
849 | packet_put_int(c->remote_id); | 853 | packet_put_int(c->remote_id); |