From: Miroslav Lichvar Date: Mon, 14 Nov 2016 11:18:56 +0000 (+0100) Subject: ntp: detect unexpected TX updates of unknown sources X-Git-Tag: 3.0-pre1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ec048ce7f4d8315e22ececd20cbdd6c1b4c6888;p=thirdparty%2Fchrony.git ntp: detect unexpected TX updates of unknown sources --- diff --git a/ntp_core.c b/ntp_core.c index 50a3aec1..e2344991 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -1930,6 +1930,9 @@ NCR_ProcessTxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a CLG_GetNtpTimestamps(log_index, &local_ntp_rx, &local_ntp_tx); + if (UTI_IsZeroNtp64(local_ntp_tx)) + return; + UTI_Ntp64ToTimespec(local_ntp_tx, &local_tx.ts); update_tx_timestamp(&local_tx, tx_ts, local_ntp_rx, NULL, message); UTI_TimespecToNtp64(&local_tx.ts, local_ntp_tx, NULL);