From ea3c60ac071176197e81a585dff2a86cda7d9fca Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 8 Mar 2020 14:53:59 +0000 Subject: [PATCH] Diverge error handling between *BSD and Linux. --- src/forward.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/forward.c b/src/forward.c index ed9c8f6..746af1c 100644 --- a/src/forward.c +++ b/src/forward.c @@ -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; }