Upgraded liboping to version 0.2.3
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 16 Jul 2006 14:17:50 +0000 (16:17 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 16 Jul 2006 14:17:50 +0000 (16:17 +0200)
src/liboping/liboping.c

index debd432..13bcc92 100644 (file)
@@ -537,7 +537,17 @@ static ssize_t ping_sendto (pingobj_t *obj, pinghost_t *ph,
                        (struct sockaddr *) ph->addr, ph->addrlen);
 
        if (ret < 0)
+       {
+#if defined(EHOSTUNREACH)
+               if (errno == EHOSTUNREACH)
+                       return (0);
+#endif
+#if defined(ENETUNREACH)
+               if (errno == ENETUNREACH)
+                       return (0);
+#endif
                ping_set_error (obj, "sendto", strerror (errno));
+       }
 
        return (ret);
 }