]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: action: Add a function pointer in act_rule struct to check its validity
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 18 Sep 2017 13:12:39 +0000 (15:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 10:36:12 +0000 (11:36 +0100)
It is possible to define the field "act_rule.check_ptr" if you want to check the
validity of a tcp/http rule.

include/types/action.h

index 1c1715492d199c44aea520aeef07ba653398003e..04a9f18b0cdf6b2f15d91e9c2c4f136768c61bdf 100644 (file)
@@ -102,6 +102,7 @@ struct act_rule {
        short deny_status;                     /* HTTP status to return to user when denying */
        enum act_return (*action_ptr)(struct act_rule *rule, struct proxy *px,  /* ptr to custom action */
                                      struct session *sess, struct stream *s, int flags);
+       int (*check_ptr)(struct act_rule *rule, struct proxy *px, char **err); /* ptr to check function */
        struct action_kw *kw;
        struct applet applet;                  /* used for the applet registration. */
        union {