]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MAJOR] session: add track-counters to track counters related to the session
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 19:04:55 +0000 (21:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 10 Aug 2010 16:04:12 +0000 (18:04 +0200)
commit9ba2dcc86c490da3275b01bdc71ff3f1716ce477
treec6a4feba4ad30e542e6fe44b05131f17a38e20d6
parent171819b5d7888e12c2392e9631c54e2548b18acf
[MAJOR] session: add track-counters to track counters related to the session

This patch adds the ability to set a pointer in the session to an
entry in a stick table which holds various counters related to a
specific pattern.

Right now the syntax matches the target syntax and only the "src"
pattern can be specified, to track counters related to the session's
IPv4 source address. There is a special function to extract it and
convert it to a key. But the goal is to be able to later support as
many patterns as for the stick rules, and get rid of the specific
function.

The "track-counters" directive may only be set in a "tcp-request"
statement right now. Only the first one applies. Probably that later
we'll support multi-criteria tracking for a single session and that
we'll have to name tracking pointers.

No counter is updated right now, only the refcount is. Some subsequent
patches will have to bring that feature.
include/proto/proto_tcp.h
include/proto/session.h
include/proto/stick_table.h
include/types/proto_tcp.h
include/types/session.h
src/cfgparse.c
src/proto_tcp.c
src/session.c
src/stick_table.c