|
Lines 2557-2563
channel_setup_remote_fwd_listener(const
Link Here
|
| 2557 |
* Initiate forwarding of connections to port "port" on remote host through |
2557 |
* Initiate forwarding of connections to port "port" on remote host through |
| 2558 |
* the secure channel to host:port from local side. |
2558 |
* the secure channel to host:port from local side. |
| 2559 |
*/ |
2559 |
*/ |
| 2560 |
|
|
|
| 2561 |
int |
2560 |
int |
| 2562 |
channel_request_remote_forwarding(const char *listen_host, u_short listen_port, |
2561 |
channel_request_remote_forwarding(const char *listen_host, u_short listen_port, |
| 2563 |
const char *host_to_connect, u_short port_to_connect) |
2562 |
const char *host_to_connect, u_short port_to_connect) |
|
Lines 2567-2572
channel_request_remote_forwarding(const
Link Here
|
| 2567 |
/* Record locally that connection to this host/port is permitted. */ |
2566 |
/* Record locally that connection to this host/port is permitted. */ |
| 2568 |
if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION) |
2567 |
if (num_permitted_opens >= SSH_MAX_FORWARDS_PER_DIRECTION) |
| 2569 |
fatal("channel_request_remote_forwarding: too many forwards"); |
2568 |
fatal("channel_request_remote_forwarding: too many forwards"); |
|
|
2569 |
|
| 2570 |
if (strlen(listen_host) > SSH_CHANNEL_PATH_LEN - 1) { |
| 2571 |
error("Listen address too long."); |
| 2572 |
return -1; |
| 2573 |
} |
| 2570 |
|
2574 |
|
| 2571 |
/* Send the forward request to the remote side. */ |
2575 |
/* Send the forward request to the remote side. */ |
| 2572 |
if (compat20) { |
2576 |
if (compat20) { |