mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 14:15:06 -05:00
clientlog: limit response rate
When the measured NTP or command request rate of a client exceeds a threshold, reply only to a small fraction of the requests to reduce the network traffic. Clients are allowed to send a burst of requests. Try to detect broken clients which increase the request rate when not getting replies and suppress the rate limiting for them. Add ratelimit and cmdratelimit directives to configure the thresholds, bursts and leak rates independently for NTP and command response rate limiting. Both are disabled by default. Commands from localhost are never limited.
This commit is contained in:
@@ -33,8 +33,10 @@
|
||||
|
||||
extern void CLG_Initialise(void);
|
||||
extern void CLG_Finalise(void);
|
||||
extern void CLG_LogNTPAccess(IPAddr *client, time_t now);
|
||||
extern void CLG_LogCommandAccess(IPAddr *client, time_t now);
|
||||
extern int CLG_LogNTPAccess(IPAddr *client, time_t now);
|
||||
extern int CLG_LogCommandAccess(IPAddr *client, time_t now);
|
||||
extern int CLG_LimitNTPResponseRate(int index);
|
||||
extern int CLG_LimitCommandResponseRate(int index);
|
||||
|
||||
/* And some reporting functions, for use by chronyc. */
|
||||
/* TBD */
|
||||
|
||||
Reference in New Issue
Block a user