]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: lb-chash: Fix the realloc() when the number of nodes is increased
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Jul 2019 11:52:13 +0000 (13:52 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 26 Jul 2019 12:12:59 +0000 (14:12 +0200)
commit366ad86af72c455cc958943913cb2de20eefee71
tree071b8bdc27bdb2e753e7a2aa34e6e3c5c7dfe536
parentd6e0c03384cab2c72fb6ab841420045108ea4e6f
BUG/MEDIUM: lb-chash: Fix the realloc() when the number of nodes is increased

When the number of nodes is increased because the server weight is changed, the
nodes array must be realloc. But its new size is not correctly set. Only the
total number of nodes is used to set the new size. But it must also depends on
the size of a node. It must be the total nomber of nodes times the size of a
node.

This issue was reported on Github (#189).

This patch must be backported to all versions since the 1.6.
src/lb_chash.c