mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 21:35:07 -05:00
nts: reset NAK indicator with new request
Don't restart NTS-KE if a spoofed NAK response was received and no valid response is received for a subsequent request.
This commit is contained in:
@@ -82,9 +82,11 @@ get_request(NNC_Instance inst)
|
||||
info.mode = MODE_CLIENT;
|
||||
info.length = random() % (sizeof (packet) + 1);
|
||||
|
||||
inst->num_cookies = 0;
|
||||
if (inst->num_cookies > 0 && random() % 2) {
|
||||
inst->num_cookies = 0;
|
||||
|
||||
TEST_CHECK(!NNC_GenerateRequestAuth(inst, &packet, &info));
|
||||
TEST_CHECK(!NNC_GenerateRequestAuth(inst, &packet, &info));
|
||||
}
|
||||
|
||||
while (!NNC_PrepareForAuth(inst)) {
|
||||
inst->next_nke_attempt = SCH_GetLastEventMonoTime() + random() % 10 - 7;
|
||||
|
||||
Reference in New Issue
Block a user