From c44d282f0b1f37cc0eb5a06e3039594b4d48aeb6 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 5 Jan 2017 15:37:34 +0100 Subject: [PATCH] ntp: ignore zero HW timestamps Apparently, zero HW timestamps are possible with buggy drivers/HW. --- ntp_io_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntp_io_linux.c b/ntp_io_linux.c index 8d0eea92..9dcbd4a7 100644 --- a/ntp_io_linux.c +++ b/ntp_io_linux.c @@ -536,7 +536,7 @@ NIO_Linux_ProcessMessage(NTP_Remote_Address *remote_addr, NTP_Local_Address *loc if (!UTI_IsZeroTimespec(&ts3.ts[0])) { LCL_CookTime(&ts3.ts[0], &local_ts->ts, &local_ts->err); local_ts->source = NTP_TS_KERNEL; - } else { + } else if (!UTI_IsZeroTimespec(&ts3.ts[2])) { iface = get_interface(if_index); if (iface) { process_hw_timestamp(iface, &ts3.ts[2], local_ts, !is_tx ? length : 0, -- 2.47.3