- if (allowed && (SSHMUX_FLAG_PORTFORWARD & flags) && listen_host && connect_host)
- {
- int ret;
- Forward * fwd;
-
- fwd = &options.local_forwards[options.num_local_forwards++];
- fwd->listen_host = xstrdup(listen_host);
- fwd->listen_port = listen_port;
- fwd->connect_host = xstrdup(connect_host);
- fwd->connect_port = connect_port;
- ret = channel_setup_local_fwd_listener(
- options.local_forwards[options.num_local_forwards-1].listen_host,
- options.local_forwards[options.num_local_forwards-1].listen_port,
- options.local_forwards[options.num_local_forwards-1].connect_host,
- options.local_forwards[options.num_local_forwards-1].connect_port,
- options.gateway_ports, options.hpn_disabled, options.hpn_buffer_size);
-
- }
-
-
- if (listen_host)
- xfree(listen_host);
- if (connect_host)
- xfree(connect_host);
-