Decrease ping6's minimum allowed interval

from .01 to .000001.

Note that due to the architecture of ping6,
you are still limited to kern.hz pings per
second.

MFC after: 2 weeks
This commit is contained in:
Mike Silbersack 2008-02-25 10:45:25 +00:00
parent ba4e014b5c
commit de625c605d

View file

@ -457,9 +457,9 @@ main(argc, argv)
if (interval.tv_sec < 0)
errx(1, "illegal timing interval %s", optarg);
/* less than 1/hz does not make sense */
if (interval.tv_sec == 0 && interval.tv_usec < 10000) {
warnx("too small interval, raised to 0.01");
interval.tv_usec = 10000;
if (interval.tv_sec == 0 && interval.tv_usec < 1) {
warnx("too small interval, raised to .000001");
interval.tv_usec = 1;
}
options |= F_INTERVAL;
break;