Mercurial > dropbear
diff svr-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 | 5120e22882de |
children | 35d504d59c05 |
line wrap: on
line diff
--- a/svr-runopts.c Tue Oct 12 23:31:09 2021 +0800 +++ b/svr-runopts.c Tue Oct 12 23:32:10 2021 +0800 @@ -100,7 +100,7 @@ #if INETD_MODE "-i Start for inetd\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, in seconds)\n" "-I <idle_timeout> (0 is never, default %d, in seconds)\n" #if DROPBEAR_PLUGIN @@ -385,12 +385,9 @@ } } #endif - + 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 (maxauthtries_arg) { @@ -402,7 +399,7 @@ svr_opts.maxauthtries = val; } - + if (keepalive_arg) { unsigned int val; if (m_str_to_uint(keepalive_arg, &val) == DROPBEAR_FAILURE) {