Opened 10 months ago
Closed 10 months ago
#18807 closed bug (fixed)
ping handles float intervals incorrectly
Reported by: | dovsienko | Owned by: | nobody |
---|---|---|---|
Priority: | low | Milestone: | R1/beta5 |
Component: | Applications/Command Line Tools | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
This uses an interval of one second (correct):
~> ping -n -i 1 127.0.0.1 ~> ping -n 127.0.0.1
This uses an interval of two seconds (correct):
~> ping -n -i 2 127.0.0.1
This rejects an invalid interval value (correct):
~> ping -n -i 0 127.0.0.1 error: bad timing interval: 0 ~> ping -n -i -1 127.0.0.1 error: bad timing interval: -1
This uses an interval of one second (incorrect):
~> ping -n -i 1.99999999 127.0.0.1
This receives the first reply and then waits indefinitely until Ctrl-C:
~> ping -n -i 0.99999999 127.0.0.1
If this implementation of ping does not support float intervals, it should reject such values with an error message, as it does above.
Change History (3)
comment:1 by , 10 months ago
Component: | Network & Internet → Applications/Command Line Tools |
---|
comment:2 by , 10 months ago
comment:3 by , 10 months ago
Milestone: | Unscheduled → R1/beta5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed by merging a newer FreeBSD ping in hrev57594.
Note:
See TracTickets
for help on using tickets.
The practical meaning of this is, I often run ping with "-i 0.2" to have a faster feedback loop when troubleshooting network issues. When the output stops after the first reply, on the surface it looks the same as a network problem.