]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: proto_tcp: track the session's counters in the connection ruleset
authorWilly Tarreau <w@1wt.eu>
Sat, 4 Apr 2015 14:38:07 +0000 (16:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Apr 2015 09:37:31 +0000 (11:37 +0200)
The tcp-request connection ruleset now only tracks session counters and
not stream counters. Thus it does not need access to the stream anymore.

src/proto_tcp.c

index b49eddde7efe3edf7bdf456fdb36baa49a0e47e8..b7451ef99a57f560601cb1fb58b21a289680b46e 100644 (file)
@@ -1403,14 +1403,14 @@ int tcp_exec_req_rules(struct stream *s)
                                 */
                                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;
 
                                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);
 
                                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) {
                                conn->flags |= CO_FL_ACCEPT_PROXY;