mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
Port range uses a ring buffer, and unfortunately, when making haproxy multithreaded, it's been overlooked, and the ring buffer is not thread-safe. When specifying a source range, 2 or more threads could pick the same port, and of course only one of them could use the port, the others would always fail the connection. To fix this, make it a lock-free ring buffer. This is easier than usual because we know the ring buffer can never be full. This should be backported to 1.8 and 1.9.