]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: actions: Use an integer to set the action type
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Dec 2019 14:10:29 +0000 (15:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 20 Jan 2020 14:18:45 +0000 (15:18 +0100)
<action> field in the act_rule structure is now an integer. The act_name values
are used for all actions without action function (but it is not a pre-requisit
though) or the action will have no effect. But for all other actions, any
integer value may used, only the action function will take care of it. The
default for such actions is ACT_CUSTOM.

include/types/action.h

index 1a7e9a641d73be3a068dbe5fd1d72e9780b14d87..2d854ae67dc44e52803e153e749b586080f8df67 100644 (file)
@@ -115,7 +115,7 @@ enum act_name {
 struct act_rule {
        struct list list;
        struct acl_cond *cond;                 /* acl condition to meet */
-       enum act_name action;                  /* ACT_ACTION_* */
+       unsigned int action;                   /* ACT_* or any meaningful value if action_ptr is defined */
        unsigned int flags;                    /* ACT_FLAG_* */
        enum act_from from;                    /* ACT_F_* */
        enum act_return (*action_ptr)(struct act_rule *rule, struct proxy *px,  /* ptr to custom action */