From 7eb05891d85b34cdbced2cb3a5bc0aca9f56fa93 Mon Sep 17 00:00:00 2001 From: Aurelien DARRAGON Date: Wed, 9 Aug 2023 17:39:29 +0200 Subject: [PATCH] BUG/MINOR: stktable: allow sc-add-gpc from tcp-request connection Following the previous commit's logic, we enable the use of sc-add-gpc from tcp-request connection since it was probably forgotten in the first place for sc-set-gpt0, and since sc-add-gpc was inspired from it, it also lacks its. As sc-add-gpc was implemented in 5a72d03a58 ("MINOR: stick-table: implement the sc-add-gpc() action"), this should only be backported to 2.8 --- src/stick_table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stick_table.c b/src/stick_table.c index 48fdaa439..3f98d6e5d 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -2966,6 +2966,7 @@ static enum act_return action_add_gpc(struct act_rule *rule, struct proxy *px, value = (unsigned int)(rule->arg.gpc.value); else { switch (rule->from) { + case ACT_F_TCP_REQ_CON: smp_opt_dir = SMP_OPT_DIR_REQ; break; case ACT_F_TCP_REQ_SES: smp_opt_dir = SMP_OPT_DIR_REQ; break; case ACT_F_TCP_REQ_CNT: smp_opt_dir = SMP_OPT_DIR_REQ; break; case ACT_F_TCP_RES_CNT: smp_opt_dir = SMP_OPT_DIR_RES; break; @@ -3066,6 +3067,7 @@ static enum act_parse_ret parse_add_gpc(const char **args, int *arg, struct prox return ACT_RET_PRS_ERR; switch (rule->from) { + case ACT_F_TCP_REQ_CON: smp_val = SMP_VAL_FE_CON_ACC; break; case ACT_F_TCP_REQ_SES: smp_val = SMP_VAL_FE_SES_ACC; break; case ACT_F_TCP_REQ_CNT: smp_val = SMP_VAL_FE_REQ_CNT; break; case ACT_F_TCP_RES_CNT: smp_val = SMP_VAL_BE_RES_CNT; break;