]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: dev: Fix data race in server round-trip time tracking
authorOndřej Surý <ondrej@isc.org>
Fri, 20 Mar 2026 01:06:29 +0000 (02:06 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 20 Mar 2026 01:06:29 +0000 (02:06 +0100)
The SRTT (Smoothed Round-Trip Time) update for remote servers was not
atomic — concurrent callers could each read the same value and one
update would be silently lost. Additionally, the aging decay applied
once per second could run multiple times if several threads entered the
function simultaneously.

Use compare-and-swap loops for the SRTT update and for the aging
timestamp to ensure no updates are lost.

Merge branch 'ondrej/fix-non-atomic-srtt-aging' into 'main'

See merge request isc-projects/bind9!11718


Trivial merge