mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 15:04:42 +00:00
BUG/MINOR: acl: properly detect pattern type SMP_T_ADDR
Since 1.6-dev4 with commit b2f8f087f
("MINOR: map: The map can return
IPv4 and IPv6"), maps can return both IPv4 and IPv6 addresses, which
is represented as SMP_T_ADDR at the output of the map converter. But
the ACL parser only checks for either SMP_T_IPV4 or SMP_T_IPV6 and
requires to see an explicit matching method specified. Given that it
uses the same pattern parser for both address families, it implicitly
is also compatible with SMP_T_ADDR, which ought to have been added
there.
This fix should be backported as far as 1.6.
This commit is contained in:
parent
aa5801bcaa
commit
78c5eec949
@ -401,6 +401,7 @@ struct acl_expr *parse_acl_expr(const char **args, char **err, struct arg_list *
|
||||
expr->pat.prune = pat_prune_fcts[PAT_MATCH_INT];
|
||||
expr->pat.expect_type = pat_match_types[PAT_MATCH_INT];
|
||||
break;
|
||||
case SMP_T_ADDR:
|
||||
case SMP_T_IPV4:
|
||||
case SMP_T_IPV6:
|
||||
expr->pat.parse = pat_parse_fcts[PAT_MATCH_IP];
|
||||
|
Loading…
Reference in New Issue
Block a user