]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cfgparse-quic: strengthen quic-cc-algo parsing
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 25 Nov 2024 14:37:46 +0000 (15:37 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 25 Nov 2024 15:19:54 +0000 (16:19 +0100)
commitd41273c6334d2767256aaac1c12229804b7549f4
tree04c5b135c19fc35542cc787b06e7f91f70b675c7
parent3500865bc112633b9c946a51be8f35f06fa4b2fc
MINOR: cfgparse-quic: strengthen quic-cc-algo parsing

quic-cc-algo is a bind keyword which is used to specify the congestion
control algorithm. It is parsed via function bind_parse_quic_cc_algo().

The parsing function was too laxed as it used strncmp for algo token
matching. This could cause surprise if specifying an invalid algorithm
but starting identically to another entry. Especially if extra
parameters are specified in parenthesis, as in this case parameters
value will be completely ignored and default value used instead.

To fix this, convert algo argument to ist. Then, use istsplit() to
extract algo token from the optional extra arguments and compare the
whole value with isteq().
src/cfgparse-quic.c