]> git.ipfire.org Git - thirdparty/bind9.git/commit
[9.20] fix: dev: Fix data race in server round-trip time tracking
authorOndřej Surý <ondrej@isc.org>
Fri, 20 Mar 2026 01:47:55 +0000 (02:47 +0100)
committerOndřej Surý <ondrej@isc.org>
Fri, 20 Mar 2026 01:47:55 +0000 (02:47 +0100)
commit31cbfc9fb36e6f0b629167a32cf6acfe7937c837
treea6c00baea7aec8c6525b2c375b54422bd6006c59
parentbe7b811fffcae12c75390fb5e482f383f3e84c2e
parentfb8a9e73ccd51e503f5446f188db36f6b2e3cd2f
[9.20] fix: dev: Fix data race in server round-trip time tracking

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.

Backport of MR !11718

Merge branch 'backport-ondrej/fix-non-atomic-srtt-aging-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11723