mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 20:45:07 -05:00
clientlog: refactor client record and API
Refactor the client record and clientlog API to reuse more code between different services and enumerate the services instead of hardcoding NTP and cmdmon.
This commit is contained in:
@@ -2081,10 +2081,10 @@ NCR_ProcessRxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a
|
||||
}
|
||||
|
||||
kod = 0;
|
||||
log_index = CLG_LogNTPAccess(&remote_addr->ip_addr, &rx_ts->ts);
|
||||
log_index = CLG_LogServiceAccess(CLG_NTP, &remote_addr->ip_addr, &rx_ts->ts);
|
||||
|
||||
/* Don't reply to all requests if the rate is excessive */
|
||||
if (log_index >= 0 && CLG_LimitNTPResponseRate(log_index)) {
|
||||
if (log_index >= 0 && CLG_LimitServiceRate(CLG_NTP, log_index)) {
|
||||
DEBUG_LOG("NTP packet discarded to limit response rate");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user