diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-05-08 22:07:39 +0200 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-05-08 22:07:39 +0200 |
commit | 69128668938c82e8d428e77726ef00b2b6f799b9 (patch) | |
tree | 1ee834a896b297768505ea963c1ed318dae3efdc /serverloop.c | |
parent | - markus@cvs.openbsd.org 2001/05/06 21:23:31 (diff) | |
download | openssh-69128668938c82e8d428e77726ef00b2b6f799b9.tar.xz openssh-69128668938c82e8d428e77726ef00b2b6f799b9.zip |
- markus@cvs.openbsd.org 2001/05/08 19:17:31
[channels.c serverloop.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 'serverloop.c')
-rw-r--r-- | serverloop.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/serverloop.c b/serverloop.c index 5b3135564..6a5f40c4b 100644 --- a/serverloop.c +++ b/serverloop.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: serverloop.c,v 1.64 2001/05/04 23:47:34 markus Exp $"); +RCSID("$OpenBSD: serverloop.c,v 1.65 2001/05/08 19:17:31 markus Exp $"); #include "xmalloc.h" #include "packet.h" @@ -890,20 +890,21 @@ server_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("server_input_channel_open: 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(); |