mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
reference: activate local reference with large root distance
Since the update to NTPv4, when the clock is in the synchronised state and the clock updates stop (e.g. sources become unreachable), it doesn't switch to the unsynchronised state and the local reference is never activate. This can be a problem for clients that rely on the server to always have root distance below some value (e.g. chronyd's maxdistance). Add a timer that will activate the local reference when the root distance reaches a specified threshold. It can be configured with the distance option in the local directive (by default 1.0 second).
This commit is contained in:
@@ -60,7 +60,7 @@ typedef struct {
|
||||
extern CPS_Status CPS_ParseNTPSourceAdd(char *line, CPS_NTP_Source *src);
|
||||
|
||||
/* Parse a command to enable local reference */
|
||||
extern int CPS_ParseLocal(char *line, int *stratum);
|
||||
extern int CPS_ParseLocal(char *line, int *stratum, double *distance);
|
||||
|
||||
/* Get a string describing error status */
|
||||
extern void CPS_StatusToString(CPS_Status status, char *dest, int len);
|
||||
|
||||
Reference in New Issue
Block a user