]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: backend: BE_LB_LKUP_CHTREE is a value, not a bit
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Jan 2019 16:07:39 +0000 (17:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jan 2019 18:33:17 +0000 (19:33 +0100)
commit6c30be52da3d949a8dd6fb5e2de7319c031e656e
tree060b12dfe985ba27219b4da71d895625c8d4a342
parent602a499da5e81d6b4cfe8410f0fc6d53c1e06745
BUG/MINOR: backend: BE_LB_LKUP_CHTREE is a value, not a bit

There are a few instances where the lookup algo is tested against
BE_LB_LKUP_CHTREE using a binary "AND" operation while this macro
is a value among a set, and not a bit. The test happens to work
because the value is exactly 4 and no bit overlaps with the other
possible values but this is a latent bug waiting for a new LB algo
to appear to strike. At the moment the only other algo sharing a bit
with it is the "first" algo which is never supported in the same code
places.

This fix should be backported to maintained versions for safety if it
passes easily, otherwise it's not important as it will not fix any
visible issue.
src/backend.c