]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: listener: enforce all_threads_mask on bind_thread on init
authorWilly Tarreau <w@1wt.eu>
Wed, 12 Feb 2020 09:15:34 +0000 (10:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Feb 2020 09:21:49 +0000 (10:21 +0100)
commit0948a781fce19a032b71e65239d6bc5d10c97522
treebc56530ede6628cb94b87b6289d50b6862e2356a
parent50b659476ceb8e5ee3a060df1da0d32d336a58a8
BUG/MINOR: listener: enforce all_threads_mask on bind_thread on init

When intializing a listener, let's make sure the bind_thread mask is
always limited to all_threads_mask when inserting the FD. This will
avoid seeing listening FDs with bits corresponding to threads that are
not active (e.g. when using "bind ... process 1/even"). The side effect
is very limited, all that was identified is that atomic operations are
used in fd_update_events() when not necessary. It's more a matter of
long-term correctness in practice.

This fix might be backported as far as 1.8 (then proto_sockpair must
be dropped).
src/proto_sockpair.c
src/proto_tcp.c
src/proto_uxst.c