mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
ntp: don't require previous HW TX timestamp to wait for another
Clients sockets are closed immediately after receiving valid response. Don't wait for the first early HW TX timestamp to enable waiting for late timestamps. It may take a long time or never come if the HW/driver is consistently slow. It's a chicken and egg problem. Instead, simply check if HW timestamping is enabled on at least one interface. Responses from NTP sources on other interfaces will always be saved (for 1 millisecond by default).
This commit is contained in:
12
ntp_io.c
12
ntp_io.c
@@ -278,6 +278,18 @@ NIO_Finalise(void)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
NIO_IsHwTsEnabled(void)
|
||||
{
|
||||
#ifdef HAVE_LINUX_TIMESTAMPING
|
||||
return NIO_Linux_IsHwTsEnabled();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
int
|
||||
NIO_OpenClientSocket(NTP_Remote_Address *remote_addr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user