From: Miroslav Lichvar Date: Tue, 27 Apr 2010 13:56:48 +0000 (+0200) Subject: Don't log network is unreachable errors X-Git-Tag: 1.25-pre1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7973aef7b745a448bc6203b90030367d177d5f22;p=thirdparty%2Fchrony.git Don't log network is unreachable errors --- diff --git a/ntp_io.c b/ntp_io.c index 7ccc4590..3fbc642d 100644 --- a/ntp_io.c +++ b/ntp_io.c @@ -454,7 +454,14 @@ send_packet(void *packet, int packetlen, NTP_Remote_Address *remote_addr) if (!cmsglen) 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", UTI_IPToString(&remote_addr->ip_addr), remote_addr->port, strerror(errno)); }