Log added NTP and command access restrictions, using INFO severity if
from a chronyc command, DEBUG otherwise (i.e. from the config).
if (status == ADF_BADSUBNET) {
return 0;
} else if (status == ADF_SUCCESS) {
+ LOG(LOG_GetContextSeverity(LOGC_Command), "%s%s %s access from %s",
+ allow ? "Allowed" : "Denied", all ? " all" : "", "command",
+ UTI_IPSubnetToString(ip_addr, subnet_bits));
return 1;
} else {
return 0;
if (status != ADF_SUCCESS)
return 0;
+ LOG(LOG_GetContextSeverity(LOGC_Command), "%s%s %s access from %s",
+ allow ? "Allowed" : "Denied", all ? " all" : "", "NTP",
+ UTI_IPSubnetToString(ip_addr, subnet_bits));
+
/* Keep server sockets open only when an address allowed */
if (allow) {
NTP_Remote_Address remote_addr;