MAJOR: acl: make use of the new argument parsing framework
The ACL parser now uses the argument parser to build a typed argument list.
Right now arguments are all strings and only one argument is supported since
this is what ACLs currently support.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 1714416..d53cd52 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1569,6 +1569,7 @@
int ret;
struct acl_expr expr;
struct acl_test test;
+ struct arg args[2];
if (!l4)
return 0;
@@ -1576,8 +1577,12 @@
memset(&expr, 0, sizeof(expr));
memset(&test, 0, sizeof(test));
- expr.arg.str = arg_p[0].data.str.str;
- expr.arg_len = arg_p[0].data.str.len;
+ args[0].type = ARGT_STR;
+ args[0].data.str.str = arg_p[0].data.str.str;
+ args[0].data.str.len = arg_p[0].data.str.len;
+ args[1].type = ARGT_STOP;
+
+ expr.args = args;
ret = acl_fetch_rdp_cookie(px, l4, NULL, ACL_DIR_REQ, &expr, &test);
if (ret == 0 || (test.flags & ACL_TEST_F_MAY_CHANGE) || temp_pattern.data.str.len == 0)