]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: server: don't report dyncookie collision on same IP servers
authorWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 15:12:11 +0000 (16:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 17:12:23 +0000 (18:12 +0100)
commita07d6f09bfbcbedcbf807c74c96cd1b6221e53a2
tree24c1733b3fd93da81192f21b179883679a71f647
parentd729a03dc8e4eabb250bc5d1a094c2a6c0858477
BUG/MINOR: server: don't report dyncookie collision on same IP servers

When using "cookie dynamic", we detect cookie hash collisions and report
them. However, the test didn't take into account the fact that servers
could have the same addresses (e.g. server templates, DNS updates in
progress etc), and could produce lots of warning that the user couldn't
do anything with.

This patch adds an address check before reporting the warning: if two
servers have the same address, regardless of the cause, it is expected
that they will have the same cookie, so there's no point emitting a
warning.

In addition, there was no info about the servers causing the problem.
The only message was to ask to change the proxy's secret key. Let's
dump the server names so that the user may also correlate what's
happening with reports from other sources, or may even just delete or
readdress one of the offending servers if relevnt.

This can be backported to stable versions. Thanks to Nathan Wehrman
for the report.
src/server.c