]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: sample: Cumulate frontend and backend sample validity flags
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Oct 2021 15:22:17 +0000 (17:22 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Oct 2021 12:12:19 +0000 (14:12 +0200)
commit7a06ffb854281a08dae8dc2c13669a3a43da1065
treebdb9225aa7d11b7ab74d93ef3ecb5be64aeab4bb
parentd4150ad8694f5fc4114a527b055eef729f261541
BUG/MEDIUM: sample: Cumulate frontend and backend sample validity flags

When the sample validity flags are computed to check if a sample is used in
a valid scope, the flags depending on the proxy capabilities must be
cumulated. Historically, for a sample on the request, only the frontend
capability was used to set the sample validity flags while for a sample on
the response only the backend was used. But it is a problem for listen or
defaults proxies. For those proxies, all frontend and backend samples should
be valid. However, at many place, only frontend ones are possible.

For instance, it is impossible to set the backend name (be_name) into a
variable from a listen proxy.

This bug exists on all stable versions. Thus this patch should probably be
backported. But with some caution because the code has probably changed
serveral times. Note that nobody has ever noticed this issue. So the need to
backport this patch must be evaluated for each branch.
src/cfgparse-listen.c
src/cfgparse.c
src/http_act.c
src/http_htx.c
src/http_rules.c
src/vars.c