freebsd-ports/net/liboping/files/patch-src_liboping.c
Dmitry Marakasov 64e50d2b9d - Implement proper handling for EHOSTDOWN on FreeBSD [1]
- While here, fix license, WWWs and silence stripping

PR:		246855
Submitted by:	portmaster@bsdforge.com (maintainer)
2021-03-19 23:01:01 +00:00

14 lines
357 B
C

--- src/liboping.c.orig 2014-09-28 09:21:20 UTC
+++ src/liboping.c
@@ -801,6 +801,11 @@ static ssize_t ping_sendto (pingobj_t *obj, pinghost_t
if (errno == ENETUNREACH)
return (0);
#endif
+ /* BSDs return EHOSTDOWN on ARP/ND failure */
+#if defined(EHOSTDOWN)
+ if (errno == EHOSTDOWN)
+ return (0);
+#endif
ping_set_errno (obj, errno);
}