summaryrefslogtreecommitdiffstats
path: root/channels.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-05-10 23:24:49 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-05-10 23:24:49 +0000
commit6d618466e8c20eba056db44acc22fc9f7048f961 (patch)
treecedeb653cb7f9338f3ba25eaf2832ece852a3b01 /channels.c
parent6aebb340fb7a9f2a2184482b9088ef57c83e1a5f (diff)
- markus@cvs.openbsd.org 2001/05/09 22:51:57
[channels.c] fix -R for protocol 2, noticed by greg@nest.cx. bug was introduced with experimental dynamic forwarding.
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/channels.c b/channels.c
index 0f3d9ca9..9397d48e 100644
--- a/channels.c
+++ b/channels.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.114 2001/05/08 19:17:30 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.115 2001/05/09 22:51:57 markus Exp $");
#include <openssl/rsa.h>
#include <openssl/dsa.h>
@@ -771,8 +771,9 @@ channel_post_port_listener(Channel *c, fd_set * readset, fd_set * writeset)
rtype = (c->type == SSH_CHANNEL_RPORT_LISTENER) ?
"forwarded-tcpip" : "direct-tcpip";
- nextstate = (c->host_port == 0) ? SSH_CHANNEL_DYNAMIC :
- SSH_CHANNEL_OPENING;
+ nextstate = (c->host_port == 0 &&
+ c->type != SSH_CHANNEL_RPORT_LISTENER) ?
+ SSH_CHANNEL_DYNAMIC : SSH_CHANNEL_OPENING;
addrlen = sizeof(addr);
newsock = accept(c->sock, &addr, &addrlen);