Bug 20572 - remote port forwarding only works with protocol 1
Summary: remote port forwarding only works with protocol 1
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: openssh
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-09 12:49 UTC by Tim Waugh
Modified: 2008-05-01 15:37 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2002-12-15 03:27:46 UTC


Attachments (Terms of Use)

Description Tim Waugh 2000-11-09 12:49:47 UTC
With Red Hat Linux 7+errata for both client and server, remote port
forwarding only works if the server has 'Protocol 1' in
/etc/ssh/sshd_config.  It doesn't seem to work with protocol 2.

Is this just omitted from the documentation, or is it supposed to work
(hope so!)?

Comment 1 Pekka Savola 2000-11-11 14:52:31 UTC
This hasn't been implemented yet.  There has been a patch on 
openssh-unix-dev list sometime ago though.

Comment 2 Pekka Savola 2000-11-14 22:26:12 UTC
FWIW, this has been implemented (based on the abovementioned patch) in the latest OpenSSH snapshots.

Comment 3 David Woodhouse 2001-02-21 15:23:02 UTC
This is fixed in the released openssh-2.5.1p1

Comment 4 Pekka Savola 2001-02-24 08:22:42 UTC
2.5.1p1 is (will be) in rawhide.

Comment 5 Tim Waugh 2001-08-01 12:04:42 UTC
This is broken again in openssh-2.9p2-3 from rawhide.

Comment 6 Pekka Savola 2001-08-16 05:41:23 UTC
Fixed in OpenSSH CVS by this, (I think):

revision 1.87
date: 2001/05/10 23:24:49;  author: mouring;  state: Exp;  lines: +4 -3
   - 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.

Index: channels.c
===================================================================
RCS file: /cvs/openssh_cvs/channels.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- channels.c	2001/05/08 20:07:40	1.86
+++ channels.c	2001/05/10 23:24:49	1.87
@@ -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 @@
 
 		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);



Note You need to log in before you can comment on or make changes to this bug.