Mercurial > dropbear
diff cli-runopts.c @ 1834:94dc11094e26
Increase max window size to 10MB, fallback rather than
exiting if an invalid value is given.
author | Matt Johnston <matt@codeconstruct.com.au> |
---|---|
date | Tue, 12 Oct 2021 23:32:10 +0800 |
parents | df8d8ec1801c |
children | 33363a68784d |
line wrap: on
line diff
--- a/cli-runopts.c Tue Oct 12 23:31:09 2021 +0800 +++ b/cli-runopts.c Tue Oct 12 23:32:10 2021 +0800 @@ -79,7 +79,7 @@ #if DROPBEAR_CLI_REMOTETCPFWD "-R <[listenaddress:]listenport:remotehost:remoteport> Remote port forwarding\n" #endif - "-W <receive_window_buffer> (default %d, larger may be faster, max 1MB)\n" + "-W <receive_window_buffer> (default %d, larger may be faster, max 10MB)\n" "-K <keepalive> (0 is never, default %d)\n" "-I <idle_timeout> (0 is never, default %d)\n" #if DROPBEAR_CLI_NETCAT @@ -451,12 +451,9 @@ && cli_opts.no_cmd == 0) { dropbear_exit("Command required for -f"); } - + if (recv_window_arg) { - opts.recv_window = atol(recv_window_arg); - if (opts.recv_window == 0 || opts.recv_window > MAX_RECV_WINDOW) { - dropbear_exit("Bad recv window '%s'", recv_window_arg); - } + parse_recv_window(recv_window_arg); } if (keepalive_arg) { unsigned int val;