mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 07:11:20 +02:00
The code is now ready to support loading pattern from filesinto trees. For that, it will be required that the ACL keyword has a flag ACL_MAY_LOOKUP and that the expr is case sensitive. When that is true, the pattern will have a flag ACL_PAT_F_TREE_OK to indicate that it is possible to feed the tree instead of a usual pattern if the parsing function is able to do this. The tree's root is pre-initialized in the pattern's value so that the function can easily find it. At that point, if the parsing function decides to use the tree, it just sets ACL_PAT_F_TREE in the return flags so that the caller knows the tree has been used and the pattern can be recycled. That way it will be possible to load some patterns into the tree when it is compatible, and other ones as linear linked lists. A good example of this might be IPv4 network entries : right now we support holes in masks, but this very rare feature is not compatible with binary lookup in trees. So the parser will be able to decide itself whether the pattern can go to the tree or not.