]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MEDIUM: tcp-rules: Don't restart tcp-request content evaluation on yield
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 14 Sep 2026 17:14:25 +0000 (19:14 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 15 Sep 2026 05:39:02 +0000 (07:39 +0200)
The commit 9f1e9ee0e ("DEBUG: stream: Display the currently running rule in
stream dump") introduced a regression. The currently evaluated "tcp-request
content" rule was reset on resume while it should not. If it yielded again,
the rules evaluation was restarted to the first rule.

The "tcp-response content" rule evaluation was properly modified by the
commit above. The same must be performed gor the "tcp-request content" rule
evaluation.

This patch should fix the issue #3496. It must be backported as far as 3.2.

src/tcp_rules.c

index 8b0d92df69e99941f7e9e16329147e3da163de45..3c2772f2e69c8a60bbf0451f293ea52613eaf8a9 100644 (file)
@@ -138,7 +138,6 @@ int tcp_inspect_request(struct stream *s, struct channel *req, int an_bit)
                int forced = s->flags & SF_RULE_FYIELD;
 
                rule = s->current_rule;
-               s->current_rule = NULL;
                s->flags &= ~SF_RULE_FYIELD;
                if (!(req->flags & SC_FL_ERROR) && !(req->flags & (CF_READ_TIMEOUT|CF_WRITE_TIMEOUT))) {
                        s->waiting_entity.type = STRM_ENTITY_NONE;