version 1.300, 2007/06/14 22:48:05 |
version 1.301, 2007/08/07 07:32:53 |
|
|
"forwarding."); |
"forwarding."); |
} |
} |
} |
} |
|
|
|
/* Initiate tunnel forwarding. */ |
|
if (options.tun_open != SSH_TUNMODE_NO) { |
|
if (client_request_tun_fwd(options.tun_open, |
|
options.tun_local, options.tun_remote) == -1) { |
|
if (options.exit_on_forward_failure) |
|
fatal("Could not request tunnel forwarding."); |
|
else |
|
error("Could not request tunnel forwarding."); |
|
} |
|
} |
} |
} |
|
|
static void |
static void |
|
|
packet_send(); |
packet_send(); |
} |
} |
|
|
if (options.tun_open != SSH_TUNMODE_NO) { |
|
Channel *c; |
|
int fd; |
|
|
|
debug("Requesting tun."); |
|
if ((fd = tun_open(options.tun_local, |
|
options.tun_open)) >= 0) { |
|
c = channel_new("tun", SSH_CHANNEL_OPENING, fd, fd, -1, |
|
CHAN_TCP_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, |
|
0, "tun", 1); |
|
c->datagram = 1; |
|
packet_start(SSH2_MSG_CHANNEL_OPEN); |
|
packet_put_cstring("tun@openssh.com"); |
|
packet_put_int(c->self); |
|
packet_put_int(c->local_window_max); |
|
packet_put_int(c->local_maxpacket); |
|
packet_put_int(options.tun_open); |
|
packet_put_int(options.tun_remote); |
|
packet_send(); |
|
} |
|
} |
|
|
|
client_session2_setup(id, tty_flag, subsystem_flag, getenv("TERM"), |
client_session2_setup(id, tty_flag, subsystem_flag, getenv("TERM"), |
NULL, fileno(stdin), &command, environ, &ssh_subsystem_reply); |
NULL, fileno(stdin), &command, environ, &ssh_subsystem_reply); |
|
|
|
|
|
|
/* XXX should be pre-session */ |
/* XXX should be pre-session */ |
ssh_init_forwarding(); |
ssh_init_forwarding(); |
ssh_control_listener(); |
|
|
|
if (!no_shell_flag || (datafellows & SSH_BUG_DUMMYCHAN)) |
if (!no_shell_flag || (datafellows & SSH_BUG_DUMMYCHAN)) |
id = ssh_session2_open(); |
id = ssh_session2_open(); |
|
|
if (options.local_command != NULL && |
if (options.local_command != NULL && |
options.permit_local_command) |
options.permit_local_command) |
ssh_local_cmd(options.local_command); |
ssh_local_cmd(options.local_command); |
|
|
|
/* Start listening for multiplex clients */ |
|
ssh_control_listener(); |
|
|
/* If requested, let ssh continue in the background. */ |
/* If requested, let ssh continue in the background. */ |
if (fork_after_authentication_flag) |
if (fork_after_authentication_flag) |