]> git.ipfire.org Git - thirdparty/bind9.git/commit
Move setting the sock->write_timeout to the async_*send
authorOndřej Surý <ondrej@isc.org>
Tue, 17 May 2022 19:31:37 +0000 (21:31 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 19 May 2022 20:38:47 +0000 (22:38 +0200)
commited4eda5ebc77c08b7ef1e6c94bea373c00c903c8
treed9fe254e0105e37fd074f68856b4c8aad039e535
parent598c93f2b220b6164a5857238241864ece60b368
Move setting the sock->write_timeout to the async_*send

Setting the sock->write_timeout from the TCP, TCPDNS, and TLSDNS send
functions could lead to (harmless) data race when setting the value for
the first time when the isc_nm_send() function would be called from
thread not-matching the socket we are sending to.  Move the setting the
sock->write_timeout to the matching async function which is always
called from the matching thread.

(cherry picked from commit 61117840c18778e69e3073cc01dbea579271a014)
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c