MEDIUM: tcp-act: <expr> support for set-fc-{mark,tos} actions

In this patch we add the possibility to use sample expression as argument
for set-fc-{mark,tos} actions. To make it backward compatible with
previous behavior, during parsing we first try to parse the value as
as integer (decimal or hex notation), and then fallback to expr parsing
in case of failure.

The documentation was updated accordingly.
This commit is contained in:
Aurelien DARRAGON
2024-01-18 17:17:41 +01:00
parent 03cb782bcb
commit b4ee7b044e
3 changed files with 134 additions and 42 deletions

View File

@@ -191,6 +191,10 @@ struct act_rule {
struct server *srv; /* target server to attach the connection */
struct sample_expr *name; /* used to differentiate idle connections */
} attach_srv; /* 'attach-srv' rule */
struct {
int value;
struct sample_expr *expr;
} expr_int; /* expr or int value (when expr is NULL)*/
struct {
void *p[4];
} act; /* generic pointers to be used by custom actions */