mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 05:45:07 -05:00
ntp: randomize replacement interval
Replacement attempts are globally rate limited to one per 7*2^8 seconds to limit the rate of DNS requests for public servers like pool.ntp.org. If multiple sources are repeatedly attempting replacement (at their polling intervals), one source can be getting all attempts for periods of time. Use a randomly generated interval to randomize the order of source replacements without changing the average rate.
This commit is contained in:
@@ -160,8 +160,8 @@ for dns in 1 0; do
|
||||
|
||||
check_file_messages " 2 1 .* 4460 " 50 100 log.packets || test_fail
|
||||
check_file_messages " 2 2 .* 4460 " 0 0 log.packets || test_fail
|
||||
check_log_messages "Source 192.168.123.1 changed to 192.168.123.2" 6 8 || test_fail
|
||||
check_log_messages "Source 192.168.123.2 replaced with 192.168.123.1" 6 8 || test_fail
|
||||
check_log_messages "Source 192.168.123.1 changed to 192.168.123.2" 4 10 || test_fail
|
||||
check_log_messages "Source 192.168.123.2 replaced with 192.168.123.1" 4 10 || test_fail
|
||||
|
||||
servers=2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user