Diverge error handling between *BSD and Linux.

This commit is contained in:
Brad Smith
2020-03-08 14:53:59 +00:00
committed by Simon Kelley
parent fc19399a1f
commit ea3c60ac07

View File

@@ -93,10 +93,13 @@ int send_from(int fd, int nowild, char *packet, size_t len,
while (retry_send(sendmsg(fd, &msg, 0)));
/* If interface is still in DAD, EINVAL results - ignore that. */
if (errno != 0 && errno != EINVAL)
if (errno != 0)
{
my_syslog(LOG_ERR, _("failed to send packet: %s"), strerror(errno));
#ifdef HAVE_LINUX_NETWORK
/* If interface is still in DAD, EINVAL results - ignore that. */
if (errno != EINVAL)
my_syslog(LOG_ERR, _("failed to send packet: %s"), strerror(errno));
#endif
return 0;
}