mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUG/MEDIUM: acl: boolean only matches were broken by recent changes
The ACL changes made in the last patchset force the execution of each pattern matching function. The function pat_match_nothing was not provided to be excuted, it was just used as a flag that was checked by the ACL execution code. Now this function is executed and always returns false. This patch makes it work as expected. Now, it returns the boolean status of the received sample just as was done previously in the ACL code. This bug is a part of the patchset just merged. It does not need to be backported.
This commit is contained in:
parent
c5a4e98639
commit
e5978bfc25
@ -433,6 +433,17 @@ int pat_parse_ip(const char *text, struct pattern *pattern, char **err)
|
||||
/* always return false */
|
||||
struct pattern *pat_match_nothing(struct sample *smp, struct pattern_expr *expr, int fill)
|
||||
{
|
||||
if (smp->data.uint) {
|
||||
if (fill) {
|
||||
static_pattern.smp = NULL;
|
||||
static_pattern.ref = NULL;
|
||||
static_pattern.flags = 0;
|
||||
static_pattern.type = 0;
|
||||
static_pattern.ptr.str = NULL;
|
||||
}
|
||||
return &static_pattern;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user