summaryrefslogtreecommitdiffstats
path: root/clientloop.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-05-09 00:01:18 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-05-09 00:01:18 +0000
commita69d89bb459fb47880b03bc003479b1d98284c2e (patch)
tree4bafd825911723278fa5897f3b92674d164c5ec7 /clientloop.c
parent23fedf5e493b1347e6923a8ea54c941fe10fb208 (diff)
I have no clue how this file was mised.. <frown>
- markus@cvs.openbsd.org 2001/05/08 19:17:31 [channels.c serverloop.c clientloop.c] adds correct error reporting to async connect()s fixes the server-discards-data-before-connected-bug found by onoe@sm.sony.co.jp
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/clientloop.c b/clientloop.c
index 3294b0cf..b2b7debc 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.68 2001/05/06 21:45:14 markus Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.69 2001/05/08 19:17:31 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1150,20 +1150,21 @@ client_input_channel_open(int type, int plen, void *ctxt)
c->remote_id = rchan;
c->remote_window = rwindow;
c->remote_maxpacket = rmaxpack;
-
- packet_start(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION);
- packet_put_int(c->remote_id);
- packet_put_int(c->self);
- packet_put_int(c->local_window);
- packet_put_int(c->local_maxpacket);
- packet_send();
+ if (c->type != SSH_CHANNEL_CONNECTING) {
+ packet_start(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION);
+ packet_put_int(c->remote_id);
+ packet_put_int(c->self);
+ packet_put_int(c->local_window);
+ packet_put_int(c->local_maxpacket);
+ packet_send();
+ }
} else {
debug("failure %s", ctype);
packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE);
packet_put_int(rchan);
packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED);
if (!(datafellows & SSH_BUG_OPENFAILURE)) {
- packet_put_cstring("bla bla");
+ packet_put_cstring("open failed");
packet_put_cstring("");
}
packet_send();