]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stktable: implement "recv-only" table option
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 5 Dec 2024 09:28:50 +0000 (10:28 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 5 Dec 2024 11:15:24 +0000 (12:15 +0100)
commit1f73d3524da419ecd420d88da03a58e03cb4f79d
tree4740eae983c9f1b56eeec9850c060e76d593c78c
parent3c239b2f80d80a744711e18640bbcc90bae4eea5
MINOR: stktable: implement "recv-only" table option

When "recv-only" keyword is added on a stick table declaration (in peers
or proxy section), haproxy considers that the table is only used for
data retrieval from a remote location and not used to perform local
updates. As such, it enables the retrieval of local-only values such
as conn_cur that are ignored by default. This can be useful in some
contexts where we want to know about local-values such are conn_cur
from a remote peer.

To do this, add stktable struct flags  which default to NONE and enable
the RECV_ONLY flag on the table then "recv-only" keyword is found in the
table declaration. Then, when in peer_treat_updatemsg(), when handling
table updates, don't ignore data updates for local-only values if the flag
is set.
doc/configuration.txt
include/haproxy/stick_table-t.h
src/peers.c
src/stick_table.c