mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
MEDIUM: proto_tcp: track the session's counters in the connection ruleset
The tcp-request connection ruleset now only tracks session counters and not stream counters. Thus it does not need access to the stream anymore.
This commit is contained in:
parent
bb2ef12a60
commit
70f454e8fa
@ -1403,14 +1403,14 @@ int tcp_exec_req_rules(struct stream *s)
|
|||||||
*/
|
*/
|
||||||
struct stktable_key *key;
|
struct stktable_key *key;
|
||||||
|
|
||||||
if (stkctr_entry(&s->stkctr[tcp_trk_idx(rule->action)]))
|
if (stkctr_entry(&sess->stkctr[tcp_trk_idx(rule->action)]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
t = rule->act_prm.trk_ctr.table.t;
|
t = rule->act_prm.trk_ctr.table.t;
|
||||||
key = stktable_fetch_key(t, s->be, sess, s, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, rule->act_prm.trk_ctr.expr, NULL);
|
key = stktable_fetch_key(t, s->be, sess, s, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, rule->act_prm.trk_ctr.expr, NULL);
|
||||||
|
|
||||||
if (key && (ts = stktable_get_entry(t, key)))
|
if (key && (ts = stktable_get_entry(t, key)))
|
||||||
stream_track_stkctr(&s->stkctr[tcp_trk_idx(rule->action)], t, ts);
|
stream_track_stkctr(&sess->stkctr[tcp_trk_idx(rule->action)], t, ts);
|
||||||
}
|
}
|
||||||
else if (rule->action == TCP_ACT_EXPECT_PX) {
|
else if (rule->action == TCP_ACT_EXPECT_PX) {
|
||||||
conn->flags |= CO_FL_ACCEPT_PROXY;
|
conn->flags |= CO_FL_ACCEPT_PROXY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user