mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00:00
MINOR: proto_tcp: tcp-request content: enable set-dst and set-dst-var
The set-dst and set dst-var are available at both 'tcp-request connection' and 'http-request' but not at the layer in the middle. This patch fixes this miss and enables both set-dst and set-dst-var at 'tcp-request content' layer.
This commit is contained in:
parent
ffe30f708f
commit
e1afd4fec6
@ -9745,6 +9745,8 @@ tcp-request content <action> [{if | unless} <condition>]
|
||||
- sc-inc-gpc0(<sc-id>)
|
||||
- sc-inc-gpc1(<sc-id>)
|
||||
- sc-set-gpt0(<sc-id>) <int>
|
||||
- set-dst <expr>
|
||||
- set-dst-port <expr>
|
||||
- set-var(<var-name>) <expr>
|
||||
- unset-var(<var-name>)
|
||||
- silent-drop
|
||||
@ -9778,6 +9780,9 @@ tcp-request content <action> [{if | unless} <condition>]
|
||||
wait until the inspect delay expires when the data to be tracked is not yet
|
||||
available.
|
||||
|
||||
The "set-dst" and "set-dst-port" are used to set respectively the destination
|
||||
IP and port. More information on how to use it at "http-request set-dst".
|
||||
|
||||
The "set-var" is used to set the content of a variable. The variable is
|
||||
declared inline. For "tcp-request session" rules, only session-level
|
||||
variables can be used, without any layer7 contents.
|
||||
|
@ -1986,29 +1986,31 @@ static struct srv_kw_list srv_kws = { "TCP", { }, {
|
||||
INITCALL1(STG_REGISTER, srv_register_keywords, &srv_kws);
|
||||
|
||||
static struct action_kw_list tcp_req_conn_actions = {ILH, {
|
||||
{ "silent-drop", tcp_parse_silent_drop },
|
||||
{ "set-src", tcp_parse_set_src_dst },
|
||||
{ "set-src-port", tcp_parse_set_src_dst },
|
||||
{ "set-dst" , tcp_parse_set_src_dst },
|
||||
{ "set-dst-port", tcp_parse_set_src_dst },
|
||||
{ "silent-drop", tcp_parse_silent_drop },
|
||||
{ /* END */ }
|
||||
}};
|
||||
|
||||
INITCALL1(STG_REGISTER, tcp_req_conn_keywords_register, &tcp_req_conn_actions);
|
||||
|
||||
static struct action_kw_list tcp_req_sess_actions = {ILH, {
|
||||
{ "silent-drop", tcp_parse_silent_drop },
|
||||
{ "set-src", tcp_parse_set_src_dst },
|
||||
{ "set-src-port", tcp_parse_set_src_dst },
|
||||
{ "set-dst" , tcp_parse_set_src_dst },
|
||||
{ "set-dst-port", tcp_parse_set_src_dst },
|
||||
{ "silent-drop", tcp_parse_silent_drop },
|
||||
{ /* END */ }
|
||||
}};
|
||||
|
||||
INITCALL1(STG_REGISTER, tcp_req_sess_keywords_register, &tcp_req_sess_actions);
|
||||
|
||||
static struct action_kw_list tcp_req_cont_actions = {ILH, {
|
||||
{ "silent-drop", tcp_parse_silent_drop },
|
||||
{ "set-dst" , tcp_parse_set_src_dst },
|
||||
{ "set-dst-port", tcp_parse_set_src_dst },
|
||||
{ "silent-drop", tcp_parse_silent_drop },
|
||||
{ /* END */ }
|
||||
}};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user