mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
ntp: add support for interleaved client/server mode
Adapt the interleaved symmetric mode for client/server associations. On server, save the state needed for detection and responding in the interleaved mode in the client log. On client, enable the interleaved mode when the server is specified with the xleave option. Always accept responses in basic mode to allow synchronization with servers that don't support the interleaved mode, have too many clients, or have multiple clients behing the same IP address. This is also necessary to prevent DoS attacks on the client by overwriting or flushing the server state. Protect the client's state variables against replay attacks as the timestamps are now needed when processing the subsequent packet.
This commit is contained in:
@@ -33,10 +33,12 @@
|
||||
|
||||
extern void CLG_Initialise(void);
|
||||
extern void CLG_Finalise(void);
|
||||
extern int CLG_GetClientIndex(IPAddr *client);
|
||||
extern int CLG_LogNTPAccess(IPAddr *client, struct timespec *now);
|
||||
extern int CLG_LogCommandAccess(IPAddr *client, struct timespec *now);
|
||||
extern int CLG_LimitNTPResponseRate(int index);
|
||||
extern int CLG_LimitCommandResponseRate(int index);
|
||||
extern void CLG_GetNtpTimestamps(int index, NTP_int64 **rx_ts, NTP_int64 **tx_ts);
|
||||
|
||||
/* And some reporting functions, for use by chronyc. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user