goto fail;
}
+ if (ms <= 0)
+ goto fail;
+
p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
io.iov_base = AVAHI_DNS_PACKET_DATA(p);
msg.msg_flags = 0;
if ((l = recvmsg(fd, &msg, 0)) < 0) {
- avahi_log_warn("recvmsg(): %s", strerror(errno));
+ /* Linux returns EAGAIN when an invalid IP packet has been
+ recieved. We suppress warnings in this case because this might
+ create quite a bit of log traffic on machines with unstable
+ links. (See #60) */
+
+ if (errno != EAGAIN)
+ avahi_log_warn("recvmsg(): %s", strerror(errno));
+
goto fail;
}
avahi_log_warn("ioctl(): %s", strerror(errno));
goto fail;
}
+
+ if (ms <= 0)
+ goto fail;
p = avahi_dns_packet_new(ms + AVAHI_DNS_PACKET_EXTRA_SIZE);
msg.msg_flags = 0;
if ((l = recvmsg(fd, &msg, 0)) < 0) {
- avahi_log_warn("recvmsg(): %s", strerror(errno));
+ /* Linux returns EAGAIN when an invalid IP packet has been
+ recieved. We suppress warnings in this case because this might
+ create quite a bit of log traffic on machines with unstable
+ links. (See #60) */
+
+ if (errno != EAGAIN)
+ avahi_log_warn("recvmsg(): %s", strerror(errno));
+
goto fail;
}