|
Lines 2218-2223
Link Here
|
| 2218 |
return success; |
2218 |
return success; |
| 2219 |
} |
2219 |
} |
| 2220 |
|
2220 |
|
|
|
2221 |
int |
| 2222 |
channel_cancel_rport_listener(const char *host, u_short port) |
| 2223 |
{ |
| 2224 |
int i, found = 0; |
| 2225 |
|
| 2226 |
for(i = 0; i < channels_alloc; i++) { |
| 2227 |
Channel *c = channels[i]; |
| 2228 |
|
| 2229 |
if (c != NULL && c->type == SSH_CHANNEL_RPORT_LISTENER) { |
| 2230 |
debug3("Channel %d %s:%d vs close msg %s:%d", |
| 2231 |
c->self, c->path, c->host_port, host, port); |
| 2232 |
if (strncmp(c->path, host, sizeof(c->path)) == 0 && |
| 2233 |
c->host_port == port) { |
| 2234 |
debug2("%s: close clannel %d", __func__, i); |
| 2235 |
channel_free(c); |
| 2236 |
found = 1; |
| 2237 |
} |
| 2238 |
} |
| 2239 |
} |
| 2240 |
|
| 2241 |
return (found); |
| 2242 |
} |
| 2243 |
|
| 2221 |
/* protocol local port fwd, used by ssh (and sshd in v1) */ |
2244 |
/* protocol local port fwd, used by ssh (and sshd in v1) */ |
| 2222 |
int |
2245 |
int |
| 2223 |
channel_setup_local_fwd_listener(u_short listen_port, |
2246 |
channel_setup_local_fwd_listener(u_short listen_port, |