mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
ntp: don't send useless requests in interleaved client mode
In interleaved client mode, when so many consecutive requests were lost
that the first valid (interleaved) response would be dropped for being
too old, switch to basic mode so the response can be accepted if it
doesn't fail in the other tests.
This reworks commit 16afa8eb50.
This commit is contained in:
@@ -251,7 +251,8 @@ test_unit(void)
|
||||
for (j = 0; j < 50; j++) {
|
||||
DEBUG_LOG("iteration %d, %d", i, j);
|
||||
|
||||
interleaved = random() % 2;
|
||||
interleaved = random() % 2 && (inst->mode != MODE_CLIENT ||
|
||||
inst->tx_count <= MAX_CLIENT_INTERLEAVED_TX);
|
||||
authenticated = random() % 2;
|
||||
valid = (!interleaved || (source.params.interleaved && has_updated)) &&
|
||||
(!source.params.authkey || authenticated);
|
||||
|
||||
Reference in New Issue
Block a user