From 546ba7eb9380f1eda3a617f764f124996006fcf1 Mon Sep 17 00:00:00 2001 From: Thomas Liske Date: Fri, 6 Jul 2012 20:56:12 +0200 Subject: [PATCH 1/2] Fix TOS option typo. --- doc/fping.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/fping.8 b/doc/fping.8 index a810b89..bba349a 100644 --- a/doc/fping.8 +++ b/doc/fping.8 @@ -141,7 +141,7 @@ multiplied by the backoff factor. Ignored (for compatibility with fping 2.4). .IP \fB\-u\fR 5 Show targets that are unreachable. -.IP \fB\-T\fIn\fR 5 +.IP \fB\-O\fIn\fR 5 Set the typ of service flag (TOS). \fIn\fR can be either decimal or hexadecimal (0xh) format. .IP \fB\-v\fR 5 Print From a5828a2795d7db84b9a83ac119b98442d140cb98 Mon Sep 17 00:00:00 2001 From: Thomas Liske Date: Fri, 6 Jul 2012 22:33:20 +0200 Subject: [PATCH 2/2] This commit fixes #13 (Debian #308695): don't remove hosts if sendto returns an error. The error might recover and fping should still try to reach the host and count it as packet loss. --- src/fping.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fping.c b/src/fping.c index e0db383..7a628bc 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1586,10 +1586,11 @@ int send_ping( int s, HOST_ENTRY *h ) }/* IF */ - num_unreachable++; - remove_job( h ); + h->num_sent++; + h->num_sent_i++; + num_pingsent++; free( buffer ); - return(0); + return(1); } /* mark this trial as outstanding */