From fbdb77582d390910be8c9fc2ba9bb7ecdd1852c5 Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Wed, 3 Jun 2015 19:32:04 +0200 Subject: [PATCH] MINOR: tcp: increase the opaque data array This patch increase the opaque data array for the tcp_rules. It is used by the "store" action (next commited) which deal with variables. --- include/types/proto_tcp.h | 2 +- src/hlua.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/types/proto_tcp.h b/include/types/proto_tcp.h index f41933b5b..a6af2d37e 100644 --- a/include/types/proto_tcp.h +++ b/include/types/proto_tcp.h @@ -57,7 +57,7 @@ struct tcp_rule { union { struct track_ctr_prm trk_ctr; struct capture_prm cap; - void *data; + void *data[4]; } act_prm; }; diff --git a/src/hlua.c b/src/hlua.c index ab4a5e7da..7919ce0e0 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -4349,7 +4349,7 @@ static int hlua_request_act_wrapper(struct hlua_rule *rule, struct proxy *px, int hlua_tcp_req_act_wrapper(struct tcp_rule *tcp_rule, struct proxy *px, struct stream *s) { - return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data, + return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data[0], px, s, AN_REQ_INSPECT_FE); } @@ -4359,7 +4359,7 @@ int hlua_tcp_req_act_wrapper(struct tcp_rule *tcp_rule, struct proxy *px, int hlua_tcp_res_act_wrapper(struct tcp_rule *tcp_rule, struct proxy *px, struct stream *s) { - return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data, + return hlua_request_act_wrapper((struct hlua_rule *)tcp_rule->act_prm.data[0], px, s, AN_RES_INSPECT); } @@ -4389,7 +4389,7 @@ int hlua_http_res_act_wrapper(struct http_res_rule *rule, struct proxy *px, static int tcp_req_action_register_lua(const char **args, int *cur_arg, struct proxy *px, struct tcp_rule *rule, char **err) { - if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data, err)) + if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data[0], err)) return 0; rule->action = TCP_ACT_CUSTOM_CONT; rule->action_ptr = hlua_tcp_req_act_wrapper; @@ -4400,7 +4400,7 @@ static int tcp_req_action_register_lua(const char **args, int *cur_arg, struct p static int tcp_res_action_register_lua(const char **args, int *cur_arg, struct proxy *px, struct tcp_rule *rule, char **err) { - if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data, err)) + if (!hlua_parse_rule(args, cur_arg, px, (struct hlua_rule **)&rule->act_prm.data[0], err)) return 0; rule->action = TCP_ACT_CUSTOM_CONT; rule->action_ptr = hlua_tcp_res_act_wrapper;