]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tcp-rules: Stop content rules eval on read error and end-of-input
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Sep 2021 12:56:30 +0000 (14:56 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Sep 2021 14:37:29 +0000 (16:37 +0200)
commitcb59e0bc3cbe48eedd88e91b999a471724a6b709
tree350376e10ef9faa0fff93e96091e4710f4940689
parenteaba25dd97e95a45ba1fa1e9ce41c951410621c0
BUG/MINOR: tcp-rules: Stop content rules eval on read error and end-of-input

For now, tcp-request and tcp-response content rules evaluation is
interrupted before the inspect-delay when the channel's buffer is full, the
RX path is blocked or when a shutdown for reads was received. To sum up, the
evaluation is interrupted when no more input data are expected. However, it
is not exhaustive. It also happens when end of input is reached (CF_EOI flag
set) or when a read error occurred (CF_READ_ERROR flag set).

Note that, AFAIK, it is only a problem on HAProy 2.3 and prior when a H1 to
H2 upgrade is performed. On newer versions, it works as expected because the
stream is not created at this stage.

This patch must be backported as far as 2.0.
src/tcp_rules.c