The unified diff between revisions [f452aa06..] and [a4cab2b4..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'cli-runopts.c'

#
#
# patch "cli-runopts.c"
#  from [79955079fc49e1b252055d125874535d52b5914b]
#    to [5e702c8f3984796ffec8a22f7032ab2ad64140cd]
#
============================================================
--- cli-runopts.c	79955079fc49e1b252055d125874535d52b5914b
+++ cli-runopts.c	5e702c8f3984796ffec8a22f7032ab2ad64140cd
@@ -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':