Code

liboping.c: Catch `EHOSTUNREACH' and `ENETUNREACH'
authorFlorian Forster <octo@verplant.org>
Sun, 16 Jul 2006 10:19:42 +0000 (12:19 +0200)
committerFlorian Forster <octo@verplant.org>
Sun, 16 Jul 2006 10:19:42 +0000 (12:19 +0200)
commit3e913e60cfcca693feed7eb89c8252f3b2815a6c
treedf05608b4e633f90b7f29d9673fa34d68467ea12
parenta60c6d40d89eec2d82d88cbad7f9a591e05a469c
liboping.c: Catch `EHOSTUNREACH' and `ENETUNREACH'

When the kernel cannot send out a packet to a host because the host or network
is unreachable, `sendto' may return with `EHOSTUNREACH' or `ENETUNREACH'. So
far all errors returned by `sendto' were considered fatal and the pinging was
aborted. This is wrong when the host is unreachable, so catching and ignoring
these errors is reasonable..
Thanks to Wolfgang Kroener for reporting and debigging this problem with me :)
src/liboping.c