ntp: make default NTP version with xleave to be always 4

If the xleave option is enabled, ignore the key option and the hash
length. Always use version 4 as the default to get interleaved responses
from new chrony servers.
This commit is contained in:
Miroslav Lichvar
2021-11-22 16:44:24 +01:00
parent 7f984cf7fa
commit dbbdd5af06
2 changed files with 6 additions and 5 deletions

View File

@@ -620,7 +620,7 @@ NCR_CreateInstance(NTP_Remote_Address *remote_addr, NTP_Source_Type type,
result->auth = NAU_CreateNoneInstance();
}
if (result->ext_field_flags)
if (result->ext_field_flags || result->interleaved)
result->version = NTP_VERSION;
else
result->version = NAU_GetSuggestedNtpVersion(result->auth);