Bugzilla – Attachment 179 Details for
Bug 413
Port forwarding: [localhost:]localport:remotehost:remoteport
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Original patch by Dan Astoorian
patch.txt (text/plain), 20.45 KB, created by
Darren Tucker
on 2002-11-23 11:24:43 AEDT
(
hide
)
Description:
Original patch by Dan Astoorian
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2002-11-23 11:24:43 AEDT
Size:
20.45 KB
patch
obsolete
>--- openssh/auth-options.c 2002/02/04 17:19:02 1.1 >+++ openssh/auth-options.c 2002/02/04 17:24:43 >@@ -214,9 +214,10 @@ > } > cp = "permitopen=\""; > if (strncasecmp(opts, cp, strlen(cp)) == 0) { >- char host[256], sport[6]; >+ char *host; > u_short port; > char *patterns = xmalloc(strlen(opts) + 1); >+ char *p; > > opts += strlen(cp); > i = 0; >@@ -240,8 +241,9 @@ > } > patterns[i] = 0; > opts++; >- if (sscanf(patterns, "%255[^:]:%5[0-9]", host, sport) != 2 && >- sscanf(patterns, "%255[^/]/%5[0-9]", host, sport) != 2) { >+ p = patterns; >+ host = hpdelim(&p); >+ if (!host) { > debug("%.100s, line %lu: Bad permitopen specification " > "<%.100s>", file, linenum, patterns); > packet_send_debug("%.100s, line %lu: " >@@ -249,9 +251,11 @@ > xfree(patterns); > goto bad_option; > } >- if ((port = a2port(sport)) == 0) { >+ host = cleanhostname(host); >+ port = p ? a2port(p) : 0; >+ if (port == 0) { > debug("%.100s, line %lu: Bad permitopen port <%.100s>", >- file, linenum, sport); >+ file, linenum, p ? p : ""); > packet_send_debug("%.100s, line %lu: " > "Bad permitopen port", file, linenum); > xfree(patterns); >--- openssh/channels.c 2002/02/04 17:19:02 1.1 >+++ openssh/channels.c 2002/02/04 19:12:34 >@@ -2046,9 +2046,10 @@ > Channel *c; > int success, sock, on = 1; > struct addrinfo hints, *ai, *aitop; >- const char *host; >+ const char *host, *addr; > char ntop[NI_MAXHOST], strport[NI_MAXSERV]; > struct linger linger; >+ int wildcard = 0, is_server = 0; > > success = 0; > host = (type == SSH_CHANNEL_RPORT_LISTENER) ? >@@ -2062,18 +2063,40 @@ > error("Forward host name too long."); > return success; > } >+ /* >+ * GatewayPorts is a default for the client, but a requirement >+ * for the server. >+ */ >+ if (type == SSH_CHANNEL_RPORT_LISTENER || listen_addr == NULL) >+ is_server = 1; > > /* > * getaddrinfo returns a loopback address if the hostname is > * set to NULL and hints.ai_flags is not AI_PASSIVE > */ >+ if (is_server && !gateway_ports) { >+ /* enforce server policy */ >+ addr = NULL; >+ } else { >+ if ( !listen_addr || listen_addr[0] == '\0' || >+ (!is_server && strcmp(listen_addr, "*") == 0) ) { >+ wildcard = 1; >+ addr = NULL; >+ } else { >+ if (listen_addr && listen_addr[0] == '\0') >+ addr = NULL; >+ else >+ addr = listen_addr; >+ } >+ } > memset(&hints, 0, sizeof(hints)); > hints.ai_family = IPv4or6; >- hints.ai_flags = gateway_ports ? AI_PASSIVE : 0; >+ hints.ai_flags = wildcard ? AI_PASSIVE : 0; > hints.ai_socktype = SOCK_STREAM; > snprintf(strport, sizeof strport, "%d", listen_port); >- if (getaddrinfo(NULL, strport, &hints, &aitop) != 0) >- packet_disconnect("getaddrinfo: fatal error"); >+ if (getaddrinfo(addr, strport, &hints, &aitop) != 0) >+ packet_disconnect("getaddrinfo: %.200s: fatal error", >+ addr ? addr : "(NULL)"); > > for (ai = aitop; ai; ai = ai->ai_next) { > if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) >@@ -2140,11 +2163,12 @@ > > /* protocol local port fwd, used by ssh (and sshd in v1) */ > int >-channel_setup_local_fwd_listener(u_short listen_port, >+channel_setup_local_fwd_listener(const char *listen_host, u_short listen_port, > const char *host_to_connect, u_short port_to_connect, int gateway_ports) > { > return channel_setup_fwd_listener(SSH_CHANNEL_PORT_LISTENER, >- NULL, listen_port, host_to_connect, port_to_connect, gateway_ports); >+ listen_host, listen_port, host_to_connect, port_to_connect, >+ gateway_ports); > } > > /* protocol v2 remote port fwd, used by sshd */ >@@ -2162,7 +2186,7 @@ > */ > > void >-channel_request_remote_forwarding(u_short listen_port, >+channel_request_remote_forwarding(const char *listen_host, u_short listen_port, > const char *host_to_connect, u_short port_to_connect) > { > int type, success = 0; >@@ -2173,7 +2197,12 @@ > > /* Send the forward request to the remote side. */ > if (compat20) { >- const char *address_to_bind = "0.0.0.0"; >+ const char *address_to_bind; >+ if (listen_host[0] == '\0' || strcmp(listen_host, "*") == 0) >+ address_to_bind = "0.0.0.0"; >+ else >+ address_to_bind = listen_host; >+ > packet_start(SSH2_MSG_GLOBAL_REQUEST); > packet_put_cstring("tcpip-forward"); > packet_put_char(0); /* boolean: want reply */ >@@ -2241,7 +2270,7 @@ > port); > #endif > /* Initiate forwarding */ >- channel_setup_local_fwd_listener(port, hostname, host_port, gateway_ports); >+ channel_setup_local_fwd_listener(NULL, port, hostname, host_port, gateway_ports); > > /* Free the argument string. */ > xfree(hostname); >--- openssh/channels.h 2002/02/04 17:19:02 1.1 >+++ openssh/channels.h 2002/02/04 18:06:00 >@@ -189,8 +189,11 @@ > void channel_input_port_forward_request(int, int); > int channel_connect_to(const char *, u_short); > int channel_connect_by_listen_address(u_short); >-void channel_request_remote_forwarding(u_short, const char *, u_short); >-int channel_setup_local_fwd_listener(u_short, const char *, u_short, int); >+void >+channel_request_remote_forwarding(const char *, u_short, const char *, u_short); >+int >+channel_setup_local_fwd_listener(const char *, u_short, const char *, u_short, >+int); > int channel_setup_remote_fwd_listener(const char *, u_short, int); > > /* x11 forwarding */ >--- openssh/misc.c 2002/02/04 17:19:02 1.1 >+++ openssh/misc.c 2002/02/04 17:24:43 >@@ -251,6 +251,51 @@ > return total; > } > >+/* Search for next delimiter between hostnames/addresses and ports. >+ * Argument may be modified (for termination). >+ * Returns *cp if parsing succeeds. >+ * *cp is set to the start of the next delimiter, if one was found. >+ * If this is the last field, *cp is set to NULL. >+ */ >+char * >+hpdelim(char **cp) >+{ >+ char *s, *old; >+ >+ if (!(cp && *cp)) >+ return NULL; >+ >+ old = s = *cp; >+ if (*s == '[') { >+ s = strchr(s, ']'); >+ if (!s) >+ return NULL; >+ else >+ ++s; >+ } else { >+ s = strpbrk(s, ":/"); >+ if (!s) >+ s = *cp + strlen(*cp); /* trailing null */ >+ } >+ >+ switch (*s) { >+ case '\0': >+ *cp = NULL; /* no more fields*/ >+ break; >+ >+ case ':': >+ case '/': >+ *s = '\0'; /* terminate */ >+ *cp = s + 1; >+ break; >+ >+ default: >+ return NULL; >+ } >+ >+ return old; >+} >+ > char * > cleanhostname(char *host) > { >--- openssh/misc.h 2002/02/04 17:19:02 1.1 >+++ openssh/misc.h 2002/02/04 17:24:44 >@@ -17,6 +17,7 @@ > void set_nonblock(int); > void unset_nonblock(int); > int a2port(const char *); >+char *hpdelim(char **); > char *cleanhostname(char *); > char *colon(char *); > long convtime(const char *); >--- openssh/readconf.c 2002/02/04 17:19:02 1.1 >+++ openssh/readconf.c 2002/02/04 17:24:44 >@@ -196,21 +196,23 @@ > */ > > void >-add_local_forward(Options *options, u_short port, const char *host, >- u_short host_port) >+add_local_forward(Options *options, const char *listen_host, >+ u_short listen_port, const char *connect_host, >+ u_short connect_port) > { > Forward *fwd; > #ifndef HAVE_CYGWIN > extern uid_t original_real_uid; >- if (port < IPPORT_RESERVED && original_real_uid != 0) >+ if (listen_port < IPPORT_RESERVED && original_real_uid != 0) > fatal("Privileged ports can only be forwarded by root."); > #endif > if (options->num_local_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION) > fatal("Too many local forwards (max %d).", SSH_MAX_FORWARDS_PER_DIRECTION); > fwd = &options->local_forwards[options->num_local_forwards++]; >- fwd->port = port; >- fwd->host = xstrdup(host); >- fwd->host_port = host_port; >+ fwd->listen_host = xstrdup(listen_host); >+ fwd->listen_port = listen_port; >+ fwd->connect_host = xstrdup(connect_host); >+ fwd->connect_port = connect_port; > } > > /* >@@ -219,17 +221,19 @@ > */ > > void >-add_remote_forward(Options *options, u_short port, const char *host, >- u_short host_port) >+add_remote_forward(Options *options, const char *listen_host, >+ u_short listen_port, const char *connect_host, >+ u_short connect_port) > { > Forward *fwd; > if (options->num_remote_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION) > fatal("Too many remote forwards (max %d).", > SSH_MAX_FORWARDS_PER_DIRECTION); > fwd = &options->remote_forwards[options->num_remote_forwards++]; >- fwd->port = port; >- fwd->host = xstrdup(host); >- fwd->host_port = host_port; >+ fwd->listen_host = xstrdup(listen_host); >+ fwd->listen_port = listen_port; >+ fwd->connect_host = xstrdup(connect_host); >+ fwd->connect_port = connect_port; > } > > static void >@@ -237,11 +241,15 @@ > { > int i; > >- for (i = 0; i < options->num_local_forwards; i++) >- xfree(options->local_forwards[i].host); >+ for (i = 0; i < options->num_local_forwards; i++) { >+ xfree(options->local_forwards[i].listen_host); >+ xfree(options->local_forwards[i].connect_host); >+ } > options->num_local_forwards = 0; >- for (i = 0; i < options->num_remote_forwards; i++) >- xfree(options->remote_forwards[i].host); >+ for (i = 0; i < options->num_remote_forwards; i++) { >+ xfree(options->remote_forwards[i].listen_host); >+ xfree(options->remote_forwards[i].connect_host); >+ } > options->num_remote_forwards = 0; > } > >@@ -273,10 +281,10 @@ > char *line, const char *filename, int linenum, > int *activep) > { >- char buf[256], *s, *string, **charptr, *endofnumber, *keyword, *arg; >- int opcode, *intptr, value; >- u_short fwd_port, fwd_host_port; >- char sfwd_host_port[6]; >+ char *s, *string, **charptr, *endofnumber, *keyword, *arg, *arg2; >+ int opcode, *intptr, value, i; >+ u_short fwd_lport, fwd_cport; >+ char *fwd_lhost, *fwd_chost, *fwdarg[4]; > > s = line; > /* Get the keyword. (Each line is supposed to begin with a keyword). */ >@@ -604,27 +612,53 @@ > if (!arg || *arg == '\0') > fatal("%.200s line %d: Missing port argument.", > filename, linenum); >- if ((fwd_port = a2port(arg)) == 0) >- fatal("%.200s line %d: Bad listen port.", >- filename, linenum); >- arg = strdelim(&s); >- if (!arg || *arg == '\0') >- fatal("%.200s line %d: Missing second argument.", >- filename, linenum); >- if (sscanf(arg, "%255[^:]:%5[0-9]", buf, sfwd_host_port) != 2 && >- sscanf(arg, "%255[^/]/%5[0-9]", buf, sfwd_host_port) != 2) >+ arg2 = strdelim(&s); /* optional second arg */ >+ >+ for (i = 0; i < 4; ++i) { >+ fwdarg[i] = hpdelim(&arg); >+ if (!fwdarg[i]) >+ break; >+ if (i<2 && !arg && arg2) { >+ arg = arg2; >+ arg2 = NULL; >+ } >+ } >+ switch(i) { >+ case 3: >+ fwd_lhost = ""; >+ fwd_lport = a2port(fwdarg[0]); >+ fwd_chost = cleanhostname(fwdarg[1]); >+ fwd_cport = a2port(fwdarg[2]); >+ break; >+ case 4: >+ fwd_lhost = cleanhostname(fwdarg[0]); >+ fwd_lport = a2port(fwdarg[1]); >+ fwd_chost = cleanhostname(fwdarg[2]); >+ fwd_cport = a2port(fwdarg[3]); >+ >+ break; >+ default: > fatal("%.200s line %d: Bad forwarding specification.", > filename, linenum); >- if ((fwd_host_port = a2port(sfwd_host_port)) == 0) >+ /* NOTREACHED */ >+ } >+ >+ if (fwd_lport == 0) >+ fatal("%.200s line %d: Bad listen port.", >+ filename, linenum); >+ if (fwd_cport == 0) > fatal("%.200s line %d: Bad forwarding port.", > filename, linenum); >+ > if (*activep) { > if (opcode == oLocalForward) >- add_local_forward(options, fwd_port, buf, >- fwd_host_port); >+ add_local_forward(options, >+ fwd_lhost, fwd_lport, >+ fwd_chost, fwd_cport); > else if (opcode == oRemoteForward) >- add_remote_forward(options, fwd_port, buf, >- fwd_host_port); >+ add_remote_forward(options, >+ fwd_lhost, fwd_lport, >+ fwd_chost, fwd_cport); > } > break; > >@@ -633,12 +667,24 @@ > if (!arg || *arg == '\0') > fatal("%.200s line %d: Missing port argument.", > filename, linenum); >- fwd_port = a2port(arg); >- if (fwd_port == 0) >+ fwd_lport = 0; >+ fwd_lhost = hpdelim(&arg); >+ if (!fwd_lhost) >+ fatal("%.200s line %d: Bad forwarding specification.", >+ filename, linenum); >+ if (arg) { >+ fwd_lport = a2port(arg); >+ fwd_lhost = cleanhostname(fwd_lhost); >+ } else { >+ fwd_lport = a2port(fwd_lhost); >+ fwd_lhost = ""; >+ } >+ if (fwd_lport == 0) > fatal("%.200s line %d: Badly formatted port number.", > filename, linenum); > if (*activep) >- add_local_forward(options, fwd_port, "socks4", 0); >+ add_local_forward(options, fwd_lhost, fwd_lport, >+ "socks4", 0); > break; > > case oClearAllForwardings: >--- openssh/readconf.h 2002/02/04 17:19:02 1.1 >+++ openssh/readconf.h 2002/02/04 17:24:44 >@@ -21,9 +21,10 @@ > /* Data structure for representing a forwarding request. */ > > typedef struct { >- u_short port; /* Port to forward. */ >- char *host; /* Host to connect. */ >- u_short host_port; /* Port to connect on host. */ >+ char *listen_host; /* Host (address) to listen on. */ >+ u_short listen_port; /* Port to forward. */ >+ char *connect_host; /* Host to connect. */ >+ u_short connect_port; /* Port to connect on connect_host. */ > } Forward; > /* Data structure for representing option data. */ > >@@ -112,7 +113,9 @@ > int > process_config_line(Options *, const char *, char *, const char *, int, int *); > >-void add_local_forward(Options *, u_short, const char *, u_short); >-void add_remote_forward(Options *, u_short, const char *, u_short); >+void >+add_local_forward(Options *, const char *, u_short, const char *, u_short); >+void >+add_remote_forward(Options *, const char *, u_short, const char *, u_short); > > #endif /* READCONF_H */ >--- openssh/servconf.c 2002/02/04 17:19:02 1.1 >+++ openssh/servconf.c 2002/02/04 17:24:44 >@@ -403,6 +403,7 @@ > int *intptr, value; > ServerOpCodes opcode; > int i, n; >+ ushort port; > > cp = line; > arg = strdelim(&cp); >@@ -475,39 +476,27 @@ > > case sListenAddress: > arg = strdelim(&cp); >- if (!arg || *arg == '\0' || strncmp(arg, "[]", 2) == 0) >+ if (!arg || *arg == '\0') > fatal("%s line %d: missing inet addr.", > filename, linenum); >- if (*arg == '[') { >- if ((p = strchr(arg, ']')) == NULL) >- fatal("%s line %d: bad ipv6 inet addr usage.", >+ p = hpdelim(&arg); >+ if (!p) >+ fatal("%s line %d: bad inet addr:port usage.", >+ filename, linenum); >+ p = cleanhostname(p); >+ if (arg) { >+ port = a2port(arg); >+ if (port == 0) { >+ fatal("%s line %d: bad port number.", > filename, linenum); >- arg++; >- memmove(p, p+1, strlen(p+1)+1); >- } else if (((p = strchr(arg, ':')) == NULL) || >- (strchr(p+1, ':') != NULL)) { >- add_listen_addr(options, arg, 0); >- break; >+ /* NOTREACHED */ >+ } >+ } else { >+ port = 0; > } >- if (*p == ':') { >- u_short port; > >- p++; >- if (*p == '\0') >- fatal("%s line %d: bad inet addr:port usage.", >- filename, linenum); >- else { >- *(p-1) = '\0'; >- if ((port = a2port(p)) == 0) >- fatal("%s line %d: bad port number.", >- filename, linenum); >- add_listen_addr(options, arg, port); >- } >- } else if (*p == '\0') >- add_listen_addr(options, arg, 0); >- else >- fatal("%s line %d: bad inet addr usage.", >- filename, linenum); >+ add_listen_addr(options, p, port); >+ > break; > > case sHostKeyFile: >--- openssh/ssh.c 2002/02/04 17:19:02 1.1 >+++ openssh/ssh.c 2002/02/04 17:30:08 >@@ -182,11 +182,11 @@ > fprintf(stderr, " -c cipher Select encryption algorithm\n"); > fprintf(stderr, " -m macs Specify MAC algorithms for protocol version 2.\n"); > fprintf(stderr, " -p port Connect to this port. Server must be on the same port.\n"); >- fprintf(stderr, " -L listen-port:host:port Forward local port to remote address\n"); >- fprintf(stderr, " -R listen-port:host:port Forward remote port to local address\n"); >+ fprintf(stderr, " -L [listen-host]:listen-port:host:port Forward local port to remote address\n"); >+ fprintf(stderr, " -R [listen-host]:listen-port:host:port Forward remote port to local address\n"); > fprintf(stderr, " These cause %s to listen for connections on a port, and\n", __progname); > fprintf(stderr, " forward them to the other side by connecting to host:port.\n"); >- fprintf(stderr, " -D port Enable dynamic application-level port forwarding.\n"); >+ fprintf(stderr, " -D [listen-host]:port Enable dynamic application-level port forwarding.\n"); > fprintf(stderr, " -C Enable compression.\n"); > fprintf(stderr, " -N Do not execute a shell or command.\n"); > fprintf(stderr, " -g Allow remote hosts to connect to forwarded ports.\n"); >@@ -249,8 +249,8 @@ > main(int ac, char **av) > { > int i, opt, exit_status, cerr; >- u_short fwd_port, fwd_host_port; >- char sfwd_port[6], sfwd_host_port[6]; >+ u_short fwd_lport, fwd_cport; >+ char *fwdarg[4], *fwd_lhost, *fwd_chost; > char *p, *cp, buf[256]; > struct stat st; > struct passwd *pw; >@@ -464,38 +464,72 @@ > > case 'L': > case 'R': >- if (sscanf(optarg, "%5[0-9]:%255[^:]:%5[0-9]", >- sfwd_port, buf, sfwd_host_port) != 3 && >- sscanf(optarg, "%5[0-9]/%255[^/]/%5[0-9]", >- sfwd_port, buf, sfwd_host_port) != 3) { >+ cp = p = xstrdup(optarg); >+ for (i = 0; i < 4; ++i) >+ if ( !(fwdarg[i] = hpdelim(&cp)) ) >+ break; >+ switch(i) { >+ case 3: >+ fwd_lhost = ""; >+ fwd_lport = a2port(fwdarg[0]); >+ fwd_chost = cleanhostname(fwdarg[1]); >+ fwd_cport = a2port(fwdarg[2]); >+ break; >+ >+ case 4: >+ fwd_lhost = cleanhostname(fwdarg[0]); >+ fwd_lport = a2port(fwdarg[1]); >+ fwd_chost = cleanhostname(fwdarg[2]); >+ fwd_cport = a2port(fwdarg[3]); >+ break; >+ >+ default: > fprintf(stderr, > "Bad forwarding specification '%s'\n", > optarg); >- usage(); >+ xfree(p); >+ exit(1); > /* NOTREACHED */ > } >- if ((fwd_port = a2port(sfwd_port)) == 0 || >- (fwd_host_port = a2port(sfwd_host_port)) == 0) { >+ if (fwd_lport == 0 || fwd_cport == 0) { > fprintf(stderr, > "Bad forwarding port(s) '%s'\n", optarg); >+ xfree(p); > exit(1); > } > if (opt == 'L') >- add_local_forward(&options, fwd_port, buf, >- fwd_host_port); >+ add_local_forward(&options, >+ fwd_lhost, fwd_lport, >+ fwd_chost, fwd_cport); >+ > else if (opt == 'R') >- add_remote_forward(&options, fwd_port, buf, >- fwd_host_port); >+ add_remote_forward(&options, >+ fwd_lhost, fwd_lport, >+ fwd_chost, fwd_cport); >+ xfree(p); > break; > > case 'D': >- fwd_port = a2port(optarg); >- if (fwd_port == 0) { >+ cp = p = xstrdup(optarg); >+ fwd_lport = 0; >+ fwd_lhost = hpdelim(&cp); /* may be NULL */ >+ if (cp) { >+ fwd_lport = a2port(cp); >+ fwd_lhost = cleanhostname(fwd_lhost); >+ } else { >+ fwd_lport = a2port(fwd_lhost); >+ fwd_lhost = ""; >+ } >+ >+ if (fwd_lport == 0) { > fprintf(stderr, "Bad dynamic port '%s'\n", > optarg); >+ xfree(p); > exit(1); > } >- add_local_forward(&options, fwd_port, "socks4", 0); >+ add_local_forward(&options, >+ fwd_lhost, fwd_lport, "socks4", 0); >+ xfree(p); > break; > > case 'C': >@@ -834,17 +868,23 @@ > { > int success = 0; > int i; >+ char *listen_host; > > /* Initiate local TCP/IP port forwardings. */ > for (i = 0; i < options.num_local_forwards; i++) { >- debug("Connections to local port %d forwarded to remote address %.200s:%d", >- options.local_forwards[i].port, >- options.local_forwards[i].host, >- options.local_forwards[i].host_port); >+ listen_host = options.local_forwards[i].listen_host; >+ if (listen_host[0] == '\0' && !options.gateway_ports) >+ listen_host = "localhost"; >+ debug("Connections to local port %.200s:%d forwarded to remote address %.200s:%d", >+ listen_host, >+ options.local_forwards[i].listen_port, >+ options.local_forwards[i].connect_host, >+ options.local_forwards[i].connect_port); > success += channel_setup_local_fwd_listener( >- options.local_forwards[i].port, >- options.local_forwards[i].host, >- options.local_forwards[i].host_port, >+ listen_host, >+ options.local_forwards[i].listen_port, >+ options.local_forwards[i].connect_host, >+ options.local_forwards[i].connect_port, > options.gateway_ports); > } > if (i > 0 && success == 0) >@@ -852,14 +892,19 @@ > > /* Initiate remote TCP/IP port forwardings. */ > for (i = 0; i < options.num_remote_forwards; i++) { >- debug("Connections to remote port %d forwarded to local address %.200s:%d", >- options.remote_forwards[i].port, >- options.remote_forwards[i].host, >- options.remote_forwards[i].host_port); >+ listen_host = options.remote_forwards[i].listen_host; >+ if (listen_host[0] == '\0' && !options.gateway_ports) >+ listen_host = "localhost"; >+ debug("Connections to remote port %.200s:%d forwarded to local address %.200s:%d", >+ listen_host, >+ options.remote_forwards[i].listen_port, >+ options.remote_forwards[i].connect_host, >+ options.remote_forwards[i].connect_port); > channel_request_remote_forwarding( >- options.remote_forwards[i].port, >- options.remote_forwards[i].host, >- options.remote_forwards[i].host_port); >+ listen_host, >+ options.remote_forwards[i].listen_port, >+ options.remote_forwards[i].connect_host, >+ options.remote_forwards[i].connect_port); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 413
:
179
|
180
|
182
|
217
|
219
|
229
|
321
|
666
|
782
|
783
|
784
|
791
|
792
|
806
|
834