From: Willy Tarreau Date: Wed, 12 Jun 2013 19:50:19 +0000 (+0200) Subject: BUG/MINOR: acl: correctly consider boolean fetches when doing casts X-Git-Tag: v1.5-dev19~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24b2c766f45e7c9f445f61268243f85209b1dccf;p=thirdparty%2Fhaproxy.git BUG/MINOR: acl: correctly consider boolean fetches when doing casts Commit 5adeda1 (acl: add option -m to change the pattern matching method) was not completely correct with regards to boolean fetches. It only used the sample type to determine if the test had to be performed as a boolean instead of relying on the match function. Due to this, a test such as the following would not correctly match as the pattern would be ignored : acl srv_down srv_is_up(s2) -m int 0 No backport is needed as this was merged first in 1.5-dev18. --- diff --git a/src/acl.c b/src/acl.c index 26c0ac8209..664ef5c659 100644 --- a/src/acl.c +++ b/src/acl.c @@ -1750,7 +1750,7 @@ int acl_exec_cond(struct acl_cond *cond, struct proxy *px, struct session *l4, v continue; } - if (smp.type == SMP_T_BOOL) { + if (expr->match == acl_match_nothing) { if (smp.data.uint) acl_res |= ACL_PAT_PASS; else