MAJOR: acl: make all ACLs reference the fetch function via a sample.
ACL fetch functions used to directly reference a fetch function. Now
that all ACL fetches have their sample fetches equivalent, we can make
ACLs reference a sample fetch keyword instead.
In order to simplify the code, a sample keyword name may be NULL if it
is the same as the ACL's, which is the most common case.
A minor change appeared, http_auth always expects one argument though
the ACL allowed it to be missing and reported as such afterwards, so
fix the ACL to match this. This is not really a bug.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 3d2efcd..b939369 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1612,10 +1612,10 @@
* Please take care of keeping this list alphabetically sorted.
*/
static struct acl_kw_list acl_kws = {{ },{
- { "dst", acl_parse_ip, smp_fetch_dst, acl_match_ip, ACL_USE_TCP4_PERMANENT, 0 },
- { "dst_port", acl_parse_int, smp_fetch_dport, acl_match_int, ACL_USE_TCP_PERMANENT, 0 },
- { "src", acl_parse_ip, smp_fetch_src, acl_match_ip, ACL_USE_TCP4_PERMANENT, 0 },
- { "src_port", acl_parse_int, smp_fetch_sport, acl_match_int, ACL_USE_TCP_PERMANENT, 0 },
+ { "dst", NULL, acl_parse_ip, acl_match_ip, ACL_USE_TCP4_PERMANENT, 0 },
+ { "dst_port", NULL, acl_parse_int, acl_match_int, ACL_USE_TCP_PERMANENT, 0 },
+ { "src", NULL, acl_parse_ip, acl_match_ip, ACL_USE_TCP4_PERMANENT, 0 },
+ { "src_port", NULL, acl_parse_int, acl_match_int, ACL_USE_TCP_PERMANENT, 0 },
{ /* END */ },
}};