Don't log network is unreachable errors
This commit is contained in:
parent
9a3bdcc20b
commit
7973aef7b7
1 changed files with 8 additions and 1 deletions
9
ntp_io.c
9
ntp_io.c
|
@ -454,7 +454,14 @@ send_packet(void *packet, int packetlen, NTP_Remote_Address *remote_addr)
|
||||||
if (!cmsglen)
|
if (!cmsglen)
|
||||||
msg.msg_control = NULL;
|
msg.msg_control = NULL;
|
||||||
|
|
||||||
if (sendmsg(sock_fd, &msg, 0) < 0 && !LOG_RateLimited()) {
|
if (sendmsg(sock_fd, &msg, 0) < 0 &&
|
||||||
|
#ifdef ENETUNREACH
|
||||||
|
errno != ENETUNREACH &&
|
||||||
|
#endif
|
||||||
|
#ifdef ENETDOWN
|
||||||
|
errno != ENETDOWN &&
|
||||||
|
#endif
|
||||||
|
!LOG_RateLimited()) {
|
||||||
LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to %s:%d : %s",
|
LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to %s:%d : %s",
|
||||||
UTI_IPToString(&remote_addr->ip_addr), remote_addr->port, strerror(errno));
|
UTI_IPToString(&remote_addr->ip_addr), remote_addr->port, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue