diff options
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 285c51d..54d4875 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -47,6 +47,7 @@ static void printhelp() { "Usage: %s [options] [user@]host\n" "Options are:\n" "-p <remoteport>\n" + "-l <username>\n" "-t Allocate a pty\n" "-T Don't allocate a pty\n" #ifdef ENABLE_CLI_PUBKEY_AUTH @@ -54,11 +55,11 @@ static void printhelp() { #endif #ifdef ENABLE_CLI_LOCALTCPFWD "-L <listenport:remotehost:remoteport> Local port forwarding\n" + "-g Allow remote hosts to connect to forwarded ports\n" #endif #ifdef ENABLE_CLI_REMOTETCPFWD "-R <listenport:remotehost:remoteport> Remote port forwarding\n" #endif - "-l <username>\n" #ifdef DEBUG_TRACE "-v verbose\n" #endif @@ -93,12 +94,11 @@ void cli_getopts(int argc, char ** argv) { #endif #ifdef ENABLE_CLI_LOCALTCPFWD cli_opts.localfwds = NULL; + opts.listen_fwd_all = 0; #endif #ifdef ENABLE_CLI_REMOTETCPFWD cli_opts.remotefwds = NULL; #endif - opts.nolocaltcp = 0; - opts.noremotetcp = 0; /* not yet opts.ipv4 = 1; opts.ipv6 = 1; @@ -167,6 +167,9 @@ void cli_getopts(int argc, char ** argv) { case 'L': nextislocal = 1; break; + case 'g': + opts.listen_fwd_all = 1; + break; #endif #ifdef ENABLE_CLI_REMOTETCPFWD case 'R': |