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.
This commit is contained in:
Guus Sliepen 2009-06-11 19:26:34 +02:00
parent df4add94a4
commit 66be914d35

View file

@ -552,6 +552,7 @@ void handle_incoming_vpn_data(int sock)
pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen); pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen);
if(pkt.len < 0) { if(pkt.len < 0) {
if(errno != EAGAIN && errno != EINTR)
logger(LOG_ERR, _("Receiving packet failed: %s"), strerror(errno)); logger(LOG_ERR, _("Receiving packet failed: %s"), strerror(errno));
return; return;
} }