diff options
author | houseofkodai <karthik@houseofkodai.in> | 2017-05-01 08:26:15 +0530 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-01-26 00:28:25 +0800 |
commit | 9c7ecf6d14a82c1b1a97e1b4a328460ba8762299 (patch) | |
tree | a4cce47cf5ff76f239ff832965822c2e0164cd05 /cli-runopts.c | |
parent | 917722257d11ea7a33990c170542aeff2b6061b1 (diff) |
cli_bind_address_connect
* replaces -b dummy option in dbclient to be similar with openssh -b option
* useful in multi-wan connections
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index ca50709..4057824 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -92,6 +92,7 @@ static void printhelp() { "-c <cipher list> Specify preferred ciphers ('-c help' to list options)\n" "-m <MAC list> Specify preferred MACs for packet verification (or '-m help')\n" #endif + "-b bind_address\n" "-V Version\n" #if DEBUG_TRACE "-v verbose (compiled with DEBUG_TRACE)\n" @@ -125,7 +126,6 @@ void cli_getopts(int argc, char ** argv) { OPT_OTHER } opt; unsigned int cmdlen; - char* dummy = NULL; /* Not used for anything real */ char* recv_window_arg = NULL; char* keepalive_arg = NULL; @@ -166,6 +166,7 @@ void cli_getopts(int argc, char ** argv) { #if DROPBEAR_CLI_PROXYCMD cli_opts.proxycmd = NULL; #endif + cli_opts.bind_address = NULL; #ifndef DISABLE_ZLIB opts.compress_mode = DROPBEAR_COMPRESS_ON; #endif @@ -314,8 +315,8 @@ void cli_getopts(int argc, char ** argv) { exit(EXIT_SUCCESS); break; case 'b': - next = &dummy; - /* FALLTHROUGH */ + next = &cli_opts.bind_address; + break; default: fprintf(stderr, "WARNING: Ignoring unknown option -%c\n", c); |