mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 05:55:07 -05:00
Limit rate of syslog messages
Error messages caused by incoming packets need to be rate limited to avoid filling up disk space.
This commit is contained in:
@@ -1358,7 +1358,7 @@ process_known
|
||||
&inst->local_ntp_tx,
|
||||
&inst->remote_addr);
|
||||
|
||||
} else {
|
||||
} else if (!LOG_RateLimited()) {
|
||||
LOG(LOGS_WARN, LOGF_NtpCore, "NTP packet received from unauthorised host %s port %d",
|
||||
UTI_IPToDottedQuad(inst->remote_addr.ip_addr),
|
||||
inst->remote_addr.port);
|
||||
@@ -1526,7 +1526,7 @@ NCR_ProcessNoauthUnknown(NTP_Packet *message, struct timeval *now, NTP_Remote_Ad
|
||||
remote_addr);
|
||||
|
||||
}
|
||||
} else {
|
||||
} else if (!LOG_RateLimited()) {
|
||||
LOG(LOGS_WARN, LOGF_NtpCore, "NTP packet received from unauthorised host %s port %d",
|
||||
UTI_IPToDottedQuad(remote_addr->ip_addr),
|
||||
remote_addr->port);
|
||||
|
||||
Reference in New Issue
Block a user