From: Christopher Faulet Date: Mon, 25 Apr 2022 12:57:58 +0000 (+0200) Subject: BUG/MINOR: rules: Fix check_capture() function to use the right rule arguments X-Git-Tag: v2.6-dev8~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=643f1b7befa9c97575aa41d705606c6fda4ed94c;p=thirdparty%2Fhaproxy.git BUG/MINOR: rules: Fix check_capture() function to use the right rule arguments The function checking captures defined in tcp-request content ruleset didn't use the right rule arguments. "arg.trk_ctr" was used instead of "arg.cap". This patch must be backported as far as 2.2. --- diff --git a/src/action.c b/src/action.c index 4ee23c5479..9d3bfe4b90 100644 --- a/src/action.c +++ b/src/action.c @@ -124,7 +124,7 @@ int check_trk_action(struct act_rule *rule, struct proxy *px, char **err) int check_capture(struct act_rule *rule, struct proxy *px, char **err) { if (rule->from == ACT_F_TCP_REQ_CNT && (px->cap & PR_CAP_FE) && !px->tcp_req.inspect_delay && - !(rule->arg.trk_ctr.expr->fetch->val & SMP_VAL_FE_SES_ACC)) { + !(rule->arg.cap.expr->fetch->val & SMP_VAL_FE_SES_ACC)) { ha_warning("%s '%s' : a 'tcp-request capture' rule explicitly depending on request" " contents without any 'tcp-request inspect-delay' setting." " This means that this rule will randomly find its contents. This can be fixed by"