From 7ec048ce7f4d8315e22ececd20cbdd6c1b4c6888 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 14 Nov 2016 12:18:56 +0100 Subject: [PATCH] ntp: detect unexpected TX updates of unknown sources --- ntp_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ntp_core.c b/ntp_core.c index 50a3aec..e234499 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);