Mercurial > dropbear
diff cli-runopts.c @ 1465:f7a53832501d
cli_bind_address_connect
* replaces -b dummy option in dbclient to be similar with openssh -b option
* useful in multi-wan connections
author | houseofkodai <karthik@houseofkodai.in> |
---|---|
date | Mon, 01 May 2017 08:26:15 +0530 |
parents | e8f67918fdc9 |
children | f787f60f8e45 |
line wrap: on
line diff
--- a/cli-runopts.c Thu Jan 25 19:51:41 2018 +0530 +++ b/cli-runopts.c Mon May 01 08:26:15 2017 +0530 @@ -92,6 +92,7 @@ "-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 @@ 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 @@ #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 @@ 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);