]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stick-table: implement the sc-add-gpc() action
authorWilly Tarreau <w@1wt.eu>
Mon, 2 Jan 2023 17:15:20 +0000 (18:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 7 Jan 2023 08:11:22 +0000 (09:11 +0100)
commit5a72d03a58120fb5378e423dc8f97d32b28d7cdf
tree565983658d6ce9797cac0da967762c5f72e3b99f
parent6c0117168e4411e108e93b0861f23a533481e136
MINOR: stick-table: implement the sc-add-gpc() action

This action increments the General Purpose Counter at the index <idx> of
the array associated to the sticky counter designated by <sc-id> by the
value of either integer <int> or the integer evaluation of expression
<expr>. Integers and expressions are limited to unsigned 32-bit values.
If an error occurs, this action silently fails and the actions evaluation
continues. <idx> is an integer between 0 and 99 and <sc-id> is an integer
between 0 and 2. It also silently fails if the there is no GPC stored at
this index. The entry in the table is refreshed even if the value is zero.
The 'gpc_rate' is automatically adjusted to reflect the average growth
rate of the gpc value.

The main use of this action is to count scores or total volumes (e.g.
estimated danger per source IP reported by the server or a WAF, total
uploaded bytes, etc).
doc/configuration.txt
include/haproxy/action-t.h
src/stick_table.c