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.
This commit is contained in:
Frédéric Lécaille 2023-11-13 19:56:28 +01:00
parent 8df7018736
commit 3741e4bf90

View File

@ -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;
}