MINOR: action: add a new ACT_F_CFG_PARSER origin designation

In order to process samples from the config file we'll need rules as
well, and these rules will have to be marked as coming from the
config parser. This new origin is used for this.
This commit is contained in:
Willy Tarreau 2021-03-26 11:11:34 +01:00
parent f9a7a8fd8e
commit 01d580ae86
2 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,7 @@ enum act_from {
ACT_F_HTTP_REQ, /* http-request */ ACT_F_HTTP_REQ, /* http-request */
ACT_F_HTTP_RES, /* http-response */ ACT_F_HTTP_RES, /* http-response */
ACT_F_TCP_CHK, /* tcp-check. */ ACT_F_TCP_CHK, /* tcp-check. */
ACT_F_CFG_PARSER, /* config parser */
}; };
enum act_return { enum act_return {

View File

@ -653,6 +653,7 @@ static enum act_return action_store(struct act_rule *rule, struct proxy *px,
case ACT_F_HTTP_REQ: dir = SMP_OPT_DIR_REQ; break; case ACT_F_HTTP_REQ: dir = SMP_OPT_DIR_REQ; break;
case ACT_F_HTTP_RES: dir = SMP_OPT_DIR_RES; break; case ACT_F_HTTP_RES: dir = SMP_OPT_DIR_RES; break;
case ACT_F_TCP_CHK: dir = SMP_OPT_DIR_REQ; break; case ACT_F_TCP_CHK: dir = SMP_OPT_DIR_REQ; break;
case ACT_F_CFG_PARSER: dir = SMP_OPT_DIR_REQ; break; /* not used anyway */
default: default:
send_log(px, LOG_ERR, "Vars: internal error while execute action store."); send_log(px, LOG_ERR, "Vars: internal error while execute action store.");
if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE))
@ -777,6 +778,7 @@ static enum act_parse_ret parse_store(const char **args, int *arg, struct proxy
case ACT_F_HTTP_REQ: flags = SMP_VAL_FE_HRQ_HDR; break; case ACT_F_HTTP_REQ: flags = SMP_VAL_FE_HRQ_HDR; break;
case ACT_F_HTTP_RES: flags = SMP_VAL_BE_HRS_HDR; break; case ACT_F_HTTP_RES: flags = SMP_VAL_BE_HRS_HDR; break;
case ACT_F_TCP_CHK: flags = SMP_VAL_BE_CHK_RUL; break; case ACT_F_TCP_CHK: flags = SMP_VAL_BE_CHK_RUL; break;
case ACT_F_CFG_PARSER: flags = SMP_VAL_CFG_PARSER; break;
default: default:
memprintf(err, memprintf(err,
"internal error, unexpected rule->from=%d, please report this bug!", "internal error, unexpected rule->from=%d, please report this bug!",