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/listener.c b/src/listener.c
index e9ce07e..28c5bf0 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -653,8 +653,8 @@
* Please take care of keeping this list alphabetically sorted.
*/
static struct acl_kw_list acl_kws = {{ },{
- { "dst_conn", acl_parse_int, smp_fetch_dconn, acl_match_int, ACL_USE_NOTHING, 0 },
- { "so_id", acl_parse_int, smp_fetch_so_id, acl_match_int, ACL_USE_NOTHING, 0 },
+ { "dst_conn", NULL, acl_parse_int, acl_match_int, ACL_USE_NOTHING, 0 },
+ { "so_id", NULL, acl_parse_int, acl_match_int, ACL_USE_NOTHING, 0 },
{ /* END */ },
}};