]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: stick-table: fix the peers overhead in proto_size
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 18 Nov 2026 10:07:58 +0000 (11:07 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 18 Nov 2026 15:33:22 +0000 (16:33 +0100)
commit854701a3395519ef3d86c51f508698b7b582b0e8
tree74ac900bad9b2260e345cfc5c128c4d65fe99b55
parent88017c5632ef71742b0a4dcb89141eabdf4af402
BUG/MEDIUM: stick-table: fix the peers overhead in proto_size

proto_size accounts for 11 bytes of encapsulation, but update messages
are built in place with the header, room for the encoded length, the
update id and the expiration date, plus the string key length. String
keys trimmed to fit the estimate, such as a large header tracked on a
table whose len is close to or above bufsize, thus never fit an update
message, and neither do binary keys of a table accepted at the limit by
the config check. Since commit ef4405d67 ("BUG/MEDIUM: peers: bound
stick-table update messages") this does not overflow the trash buffer
anymore, but the peer session is closed and reopened in loop and the
resync never completes. See GitHub issue #3576.

Let's count the real overhead. This was brought by commit 858263591
("MINOR: stick-table: calculate the on-wire size of each key") and must
be backported wherever it was, along with previous commit "MINOR: peers:
move message length constants to peers-t.h".
src/stick_table.c