Subject: bin/13300: ping should allow -i 0.1 for users
To: None <>
From: John Hawkinson <>
List: netbsd-bugs
Date: 06/24/2001 21:19:32
>Number:         13300
>Category:       bin
>Synopsis:       ping should allow -i 0.1 for users
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 24 18:23:00 PDT 2001
>Originator:     John Hawkinson
>Release:        -current of 24 Jun 2001
System: NetBSD 1.5U NetBSD 1.5U (ZORKMID-$Revision: 1.10 $) #103: Mon May 21 21:10:47 EDT 2001 i386

	It sure would be nice if the ping program allowed the use of
-i 0.1 for non-root users. While -i 1 makes a nice default, it is not
unreasonable for users to want to get a more precise view of changing
network properties. Especially in a world where network properties are
increasingly relevent to users (our reliable Internet), and network
properties are increasingly unstable, especially with technologies like
wireless networking.

	I don't think that there is any trouble supporting 10pps of
diagnostic traffic, instead of 1pps, though I certainly agree that -i 0.1
should not be the default.

	CONCERN (for ippm people) is 10pps getting to the point where
it might be important to look into Poisson distributions? My feeling is
this should be done anyway, and that 10pps might be a level where it could
be easily done without interfering with the user, but there is no
compelling reason why this change should wait for a Poisson implementation.
	Proposed patch.

Index: ping.c
RCS file: /cvsroot/basesrc/sbin/ping/ping.c,v
retrieving revision 1.59
diff -u -r1.59 ping.c
--- ping.c	2001/02/19 22:56:21	1.59
+++ ping.c	2001/06/25 01:21:01
@@ -403,8 +403,8 @@
 #ifndef sgi
 	if (pingflags & F_FLOOD && getuid())
 		errx(1, "Must be superuser to use -f");
-	if (interval < 1.0 && getuid())
-		errx(1, "Must be superuser to use < 1 sec ping interval");
+	if (interval < 0.1 && getuid())
+		errx(1, "Must be superuser to use < 0.01 second ping interval");
 	if (preload > 0 && getuid())
 		errx(1, "Must be superuser to use -l");