mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-05 01:07:59 +00:00
haproxy public development tree
This function is designed to enlarge the scope of a lookup performed by a caller via ebmb_lookup_longest() that was not satisfied with the result. It will first visit next duplicates, and if none are found, it will go up in the tree to visit similar keys with shorter prefixes and will return them if they match. We only use the starting point's value to perform the comparison since it was expected to be valid for the looked up key, hence it has all bits in common with its own length. The algorithm is a bit complex because when going up we may visit nodes that are located beneath the level we just come from. However it is guaranteed that keys having a shorter prefix will be present above the current location, though they may be attached to the left branch of a cover node, so we just visit all nodes as long as their prefix is too large, possibly go down along the left branch on cover nodes, and stop when either there's a match, or there's a non-matching prefix anymore. The following tricky case now works fine and properly finds 10.0.0.0/7 when looking up 11.0.0.1 from tree version 1 though both belong to different sub-trees: prepare map #1 add map @1 #1 10.0.0.0/7 10.0.0.0/7 add map @1 #1 10.0.0.0/7 10.0.0.0/7 commit map @1 #1 prepare map #1 add map @2 #1 11.0.0.0/8 11.0.0.0/8 add map @2 #1 11.0.0.0/8 11.0.0.0/8 prepare map #1 add map @1 #1 10.0.0.0/7 10.0.0.0/7 commit map @1 #1 prepare map #1 add map @2 #1 10.0.0.0/7 10.0.0.0/7 add map @2 #1 11.0.0.0/8 11.0.0.0/8 add map @2 #1 11.0.0.0/8 11.0.0.0/8 |
||
---|---|---|
.github | ||
addons | ||
admin | ||
dev | ||
doc | ||
examples | ||
include | ||
reg-tests | ||
scripts | ||
src | ||
tests | ||
.cirrus.yml | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
BRANCHES | ||
CHANGELOG | ||
CONTRIBUTING | ||
INSTALL | ||
LICENSE | ||
MAINTAINERS | ||
Makefile | ||
README | ||
SUBVERS | ||
VERDATE | ||
VERSION |
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)