From: Miroslav Lichvar Date: Mon, 25 Oct 2021 08:18:27 +0000 (+0200) Subject: ntp: initialize saved TX timestamp X-Git-Tag: 4.2-pre1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5dde9b66a9b2b7f6885c4b4d4493ac6d21a2fd7;p=thirdparty%2Fchrony.git ntp: initialize saved TX timestamp Zero the initial TX timestamp which is saved for the interleaved mode in case there is no previous timestamp saved in clientlog and transmit_packet() does not generate a new one (e.g. due to failure in authentication). Fixes: 5f4cbaab7e0e ("ntp: optimize detection of clients using interleaved mode") --- diff --git a/ntp_core.c b/ntp_core.c index 79912995..27348e87 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -2129,6 +2129,7 @@ NCR_ProcessRxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a UTI_CompareNtp64(&message->receive_ts, &message->transmit_ts) != 0) { ntp_rx = message->originate_ts; local_ntp_rx = &ntp_rx; + UTI_ZeroTimespec(&local_tx.ts); interleaved = CLG_GetNtpTxTimestamp(&ntp_rx, &local_tx.ts); tx_ts = &local_tx;