BUG/MINOR: stktable: allow sc-set-gpt(0) from tcp-request connection
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 9 Aug 2023 15:23:32 +0000 (17:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Aug 2023 07:03:44 +0000 (09:03 +0200)
commit6c79309fda89d7543cd8686ef6206c5cac4e36d9
tree61325a04a73295cc7a42c8024d5b2ee892668da3
parent67da85fa4c06e8c2f4567a0454e6656f4a05e259
BUG/MINOR: stktable: allow sc-set-gpt(0) from tcp-request connection

Both the documentation and original developer intents seem to suggest
that sc-set-gpt/sc-set-gpt0 actions should be available from
tcp-request connection.

Yet because it was probably forgotten when expr support was added to
sc-set-gpt0 in 0d7712dff0 ("MINOR: stick-table: allow sc-set-gpt0 to
set value from an expression") it doesn't work and will report this
kind of errors:
 "internal error, unexpected rule->from=0, please report this bug!"

Fixing the code to comply with the documentation and the expected
behavior.

This must be backported to every stable versions.

[for < 2.5, as only sc-set-gpt0 existed back then, the patch must be
manually applied to skip irrelevant parts]
src/stick_table.c