]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: detect unexpected TX updates of unknown sources
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 14 Nov 2016 11:18:56 +0000 (12:18 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 15 Nov 2016 13:55:25 +0000 (14:55 +0100)
ntp_core.c

index 50a3aec1483775981ceaacc2fec3badadfe7a7b6..e2344991773fd50deccea503ebe8e0e561a7eb17 100644 (file)
@@ -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);