]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tools: use the hashed random pair for UUID generation
authorWilly Tarreau <w@1wt.eu>
Mon, 25 May 2026 15:56:01 +0000 (17:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 26 May 2026 11:13:24 +0000 (13:13 +0200)
commit85003563c5bbadd3f1197fb3f2801abb933566e3
tree506bc7981a39def871cf628b95d5a59db918c580
parentf932863484f43d15cf93a885c0484035eeec94d8
MEDIUM: tools: use the hashed random pair for UUID generation

The UUID generation used to emit the internal PRNG state, which allows
to predict previous and next ones, or disclose the internal PRNG state.
While not critical, it may eventually become an issue.

This patch uses the new ha_random64_pair_hashed() function that returns
a pair of u64 that are hashed from the internal PRNG state. It's almost
twice as fast on 20 threads (14.1M UUID/s vs 7.8M/s).
src/tools.c