search for: channel_pre_dynamic

Displaying 6 results from an estimated 6 matches for "channel_pre_dynamic".

2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...n_addr)); - buffer_append(&c->output, &dest_port, sizeof(dest_port)); + buffer_append(output, &s5_rsp, sizeof(s5_rsp)); + buffer_append(output, &dest_addr, sizeof(struct in_addr)); + buffer_append(output, &dest_port, sizeof(dest_port)); return 1; } @@ -1317,6 +1341,92 @@ channel_pre_dynamic(Channel *c, fd_set *readset, fd_set *writeset) } } +static void +channel_pre_rdynamic(Channel *c, fd_set *readset, fd_set *writeset) +{ + u_char *p; + u_int have; + int ret; + + if (c->sock >= 0) { + /* SOCKS session was established. */ + FD_SET(c->sock, writeset); + return; + } +...
2001 Jul 04
1
remote forwarding in 2.9p2
...channel type of SSH_CHANNEL_RPORT_LISTENER, c->host_port is 0 and therefore, per the above code, nextstate == SSH_CHANNEL_DYNAMIC and port_open_helper() is not called. I am not sure what the function of SSH_CHANNEL_DYNAMIC is but it looks like it has something to do with socks4 (from looking at channel_pre_dynamic()) and probably doesn't apply to the SSH_CHANNEL_RPORT_LISTENER case. I suspect that nextstate should be SSH_CHANNEL_OPENING in order to call port_open_helper(). I tried to make the change : nextstate = (c->type == SSH_CHANNEL_RPORT_LISTENER) ? SSH_CHANNEL_OPENING : (c->ho...
2001 Oct 24
2
disable features
...&channel_pre_listener; - channel_pre[SSH_CHANNEL_X11_LISTENER] = &channel_pre_listener; - channel_pre[SSH_CHANNEL_AUTH_SOCKET] = &channel_pre_listener; channel_pre[SSH_CHANNEL_CONNECTING] = &channel_pre_connecting; +#ifdef WITH_DYNFWD channel_pre[SSH_CHANNEL_DYNAMIC] = &channel_pre_dynamic; +#endif +#endif +#ifdef WITH_X11FWD + channel_pre[SSH_CHANNEL_X11_OPEN] = &channel_pre_x11_open; + channel_pre[SSH_CHANNEL_X11_LISTENER] = &channel_pre_listener; +#endif +#ifdef WITH_AGENTFWD + channel_pre[SSH_CHANNEL_AUTH_SOCKET] = &channel_pre_listener; +#endif channel_post[SS...
2003 Jun 25
1
socks5 support for -D
...+ + buffer_append(&c->output, (char *)&s5_rsp, sizeof(s5_rsp)); + buffer_append(&c->output, (char *)&dest_addr, sizeof(struct in_addr)); + buffer_append(&c->output, (char *)&dest_port, sizeof(dest_port)); + return 1; +} + /* dynamic port forwarding */ static void channel_pre_dynamic(Channel *c, fd_set * readset, fd_set * writeset) @@ -952,7 +1061,7 @@ debug2("channel %d: pre_dynamic: have %d", c->self, have); /* buffer_dump(&c->input); */ /* check if the fixed size part of the packet is in buffer. */ - if (have < 4) { + if (have < 3) { /* nee...
2020 Oct 14
2
Connection hang, can't stop SSH
Using OpenSSH_8.3p1 I had an open (working) connection to some other box; after a bit of inactivity, some device in the middle seems to have forgotten about the TCP connection (NAT) and broke it. I've got an EscapeChar defined, though; so first I tried to send a BREAK and, when that didn't help (TCP already gone, packets get lost!), I tried (just out of curiosity) a Rekey. Now I can see
2010 Jan 14
1
ssh(1) multiplexing rewrite
...st_output_drain_13(Channel *c, fd_set *readset, fd_set *writeset) @@ -1817,6 +1931,8 @@ channel_handler_init_20(void) channel_pre[SSH_CHANNEL_AUTH_SOCKET] = &channel_pre_listener; channel_pre[SSH_CHANNEL_CONNECTING] = &channel_pre_connecting; channel_pre[SSH_CHANNEL_DYNAMIC] = &channel_pre_dynamic; + channel_pre[SSH_CHANNEL_MUX_LISTENER] = &channel_pre_listener; + channel_pre[SSH_CHANNEL_MUX_CLIENT] = &channel_pre_mux_client; channel_post[SSH_CHANNEL_OPEN] = &channel_post_open; channel_post[SSH_CHANNEL_PORT_LISTENER] = &channel_post_port_listener; @@ -1825,6 +1941,8...