From: Guus Sliepen Date: Thu, 11 Jun 2009 17:26:34 +0000 (+0200) Subject: Do not log errors when recvfrom() returns EAGAIN or EINTR. X-Git-Tag: release-1.0.10~50 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=66be914d35cb7e7ea4dd4aed68ae9e41addd9f70;p=tinc Do not log errors when recvfrom() returns EAGAIN or EINTR. Although we select() before we call recvfrom(), it sometimes happens that select() tells us we can read but a subsequent read fails anyway. This is harmless. --- diff --git a/src/net_packet.c b/src/net_packet.c index 9f612751..5e503f58 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -552,7 +552,8 @@ void handle_incoming_vpn_data(int sock) pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen); if(pkt.len < 0) { - logger(LOG_ERR, _("Receiving packet failed: %s"), strerror(errno)); + if(errno != EAGAIN && errno != EINTR) + logger(LOG_ERR, _("Receiving packet failed: %s"), strerror(errno)); return; }