mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 14:45:07 -05:00
clientlog: save time of last hit with sub-second resolution
Instead of time_t use a 32-bit fixed point representation with 4-bit fraction to save the time of the last hit. The rate can now be measured up to 16 packets per second. Maximum interval between hits is about 4 years.
This commit is contained in:
@@ -1686,7 +1686,7 @@ NCR_ProcessUnknown
|
||||
return;
|
||||
}
|
||||
|
||||
log_index = CLG_LogNTPAccess(&remote_addr->ip_addr, now->tv_sec);
|
||||
log_index = CLG_LogNTPAccess(&remote_addr->ip_addr, now);
|
||||
|
||||
/* Don't reply to all requests if the rate is excessive */
|
||||
if (log_index >= 0 && CLG_LimitNTPResponseRate(log_index)) {
|
||||
|
||||
Reference in New Issue
Block a user