From: Frédéric Lécaille Date: Mon, 13 Nov 2023 18:56:28 +0000 (+0100) Subject: BUG/MINOR: quic: maximum window limits do not match the doc X-Git-Tag: v2.9-dev10~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3741e4bf904ed9665d1e37ef6a55960a0dae549a;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: maximum window limits do not match the doc This bug arrived with this commit: MINOR: quic: Add a max window parameter to congestion control algorithms The documentation was been modified with missing/wrong modifications in the code part. The 'g' suffix must be accepted to parse value in gigabytes. And exctly 4g is also accepted. No need to backport. --- diff --git a/src/cfgparse-quic.c b/src/cfgparse-quic.c index 6ca83c8123..8029408503 100644 --- a/src/cfgparse-quic.c +++ b/src/cfgparse-quic.c @@ -82,8 +82,8 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px, end_opt++; } else if (*end_opt == 'g') { - memprintf(err, "'%s' : should be smaller than 1g", args[cur_arg + 1]); - goto fail; + cwnd <<= 30; + end_opt++; } if (*end_opt != ')') { @@ -91,7 +91,7 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px, goto fail; } - if (cwnd < 10240 || cwnd >= (4UL << 30)) { + if (cwnd < 10240 || cwnd > (4UL << 30)) { memprintf(err, "'%s' : should be greater than 10k and smaller than 4g", args[cur_arg + 1]); goto fail; }