mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 00:25:07 -05:00
ntp: improve debug messages with port number
This commit is contained in:
11
ntp_core.c
11
ntp_core.c
@@ -914,8 +914,7 @@ receive_timeout(void *arg)
|
|||||||
{
|
{
|
||||||
NCR_Instance inst = (NCR_Instance)arg;
|
NCR_Instance inst = (NCR_Instance)arg;
|
||||||
|
|
||||||
DEBUG_LOG("Receive timeout for [%s:%d]",
|
DEBUG_LOG("Receive timeout for %s", UTI_IPSockAddrToString(&inst->remote_addr));
|
||||||
UTI_IPToString(&inst->remote_addr.ip_addr), inst->remote_addr.port);
|
|
||||||
|
|
||||||
inst->rx_timeout_id = 0;
|
inst->rx_timeout_id = 0;
|
||||||
close_client_socket(inst);
|
close_client_socket(inst);
|
||||||
@@ -1172,8 +1171,7 @@ transmit_timeout(void *arg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_LOG("Transmit timeout for [%s:%d]",
|
DEBUG_LOG("Transmit timeout for %s", UTI_IPSockAddrToString(&inst->remote_addr));
|
||||||
UTI_IPToString(&inst->remote_addr.ip_addr), inst->remote_addr.port);
|
|
||||||
|
|
||||||
/* Open new client socket */
|
/* Open new client socket */
|
||||||
if (inst->mode == MODE_CLIENT) {
|
if (inst->mode == MODE_CLIENT) {
|
||||||
@@ -2103,9 +2101,8 @@ NCR_ProcessRxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!ADF_IsAllowed(access_auth_table, &remote_addr->ip_addr)) {
|
if (!ADF_IsAllowed(access_auth_table, &remote_addr->ip_addr)) {
|
||||||
DEBUG_LOG("NTP packet received from unauthorised host %s port %d",
|
DEBUG_LOG("NTP packet received from unauthorised host %s",
|
||||||
UTI_IPToString(&remote_addr->ip_addr),
|
UTI_IPToString(&remote_addr->ip_addr));
|
||||||
remote_addr->port);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
3
ntp_io.c
3
ntp_io.c
@@ -433,8 +433,7 @@ NIO_SendPacket(NTP_Packet *packet, NTP_Remote_Address *remote_addr,
|
|||||||
assert(initialised);
|
assert(initialised);
|
||||||
|
|
||||||
if (local_addr->sock_fd == INVALID_SOCK_FD) {
|
if (local_addr->sock_fd == INVALID_SOCK_FD) {
|
||||||
DEBUG_LOG("No socket to send to %s:%d",
|
DEBUG_LOG("No socket to send to %s", UTI_IPSockAddrToString(remote_addr));
|
||||||
UTI_IPToString(&remote_addr->ip_addr), remote_addr->port);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user