Date: Tue, 12 Jul 2005 18:41:15 +0200 (CEST) From: Andre Albsmeier <Andre.Albsmeier@siemens.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/83339: [PATCH] for net/fping Message-ID: <200507121641.j6CGfFQS006095@curry.mchp.siemens.de> Resent-Message-ID: <200507121650.j6CGoDcC056229@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 83339 >Category: ports >Synopsis: [PATCH] for net/fping >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 12 16:50:12 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Andre Albsmeier >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: FreeBSD FreeBSD 5.4-STABLE #2: Tue Jul 12 13:55:14 CEST 2005 >Description: 1. fping does currently not allow to specify zero retries 2. the manpage talks about microseconds instead of milliseconds (it had been microseconds in earlier versions). >How-To-Repeat: 1. fping -r 0 target 2. time fping -B 1 -r 1 -t 5000 10.11.12.13 (or whatever) returns after 2 * 5000 milliseconds (not microseconds) >Fix: diff -ru fping.OLD/files/patch-02 fping/files/patch-02 --- fping.OLD/files/patch-02 Mon Oct 27 20:34:19 2003 +++ fping/files/patch-02 Tue Jul 12 18:11:45 2005 @@ -1,5 +1,5 @@ --- fping.c.orig Mon Jan 21 02:06:30 2002 -+++ fping.c Sat Oct 25 21:33:01 2003 ++++ fping.c Tue Jul 12 18:11:30 2005 @@ -42,7 +42,6 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. @@ -63,6 +63,17 @@ ident = getpid() & 0xFFFF; verbose_flag = 1; +@@ -502,8 +504,8 @@ + break; + + case 'r': +- if( !( retry = ( u_int )atoi( optarg ) ) ) +- usage(); ++ retry = ( u_int )atoi( optarg ); ++ + + break; + @@ -823,6 +825,7 @@ while( fgets( line, 132, ping_file ) ) diff -ru fping.OLD/files/patch-03 fping/files/patch-03 --- fping.OLD/files/patch-03 Fri Jan 10 09:26:25 2003 +++ fping/files/patch-03 Tue Jul 12 18:01:45 2005 @@ -6,42 +6,6 @@ .SH NAME fping \- send ICMP ECHO_REQUEST packets to network hosts .SH SYNOPSIS -@@ -79,7 +79,7 @@ - - somehost : 91.7 37.0 29.2 - 36.8 - --shows the response time in milliseconds for each of the five requests, -+shows the response time in microseconds for each of the five requests, - with the "-" indicating that no response was received to the fourth - request. - .IP \fB-d\fR 5 -@@ -107,7 +107,7 @@ - .IP \fB-h\fR 5 - Print usage message. - .IP \fB-i\fIn\fR 5 --The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25). -+The minimum amount of time (in microseconds) between sending a ping packet to any target (default is 25). - .IP \fB-l\fR 5 - Loop sending packets to each target indefinitely. Can be interrupted - with ctl-C; statistics about responses for each target are then displayed. -@@ -117,7 +117,7 @@ - Same as -d. - .IP \fB-p\fR 5 - In looping or counting modes (-l, -c, or -C), this parameter sets the --time in milliseconds that -+time in microseconds that - .B fping - waits between successive packets to an individual target. Default is - 1000. -@@ -131,7 +131,7 @@ - .IP \fB-s\fR 5 - Print cumulative statistics upon exit. - .IP \fB-t\fIn\fR 5 --Initial target timeout in milliseconds (default 500). In the default -+Initial target timeout in microseconds (default 2500). In the default - mode, this is the amount of time that - .B fping - waits for a response to its first request. Successive timeouts are @@ -152,12 +152,12 @@ example none the less. .nf >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507121641.j6CGfFQS006095>