Bug 24261 - ping flood count flag broken with ICMP unreachable
Summary: ping flood count flag broken with ICMP unreachable
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: iputils
Version: 7.1
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact: Aaron Brown
URL:
Whiteboard: Florence Gold
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-18 05:30 UTC by Thornton Prime
Modified: 2013-05-06 17:15 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-01-18 21:24:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Thornton Prime 2001-01-18 05:30:01 UTC
The man page says:

     -c count
             Stop after sending count ECHO_REQUEST packets. With deadline
op-
             tion, ping waits for count ECHO_REPLY packets, until the
timeout
             expires.

However, if you mix the -f flag with -c, it appears to *not* count
ECHO_REQUEST, and only counts ECHO_REPLY. This is bad because if you use -f
and -c on a host that's unreachable, it doesn't stop at #count and keeps
flood pinging forever. It is as if it implies a -w with an infinite value.

Specifying the -w deadline option with a reasonable value works with -f and
-c fine.

Examples ->

This is fine:
# ping -c 50 -n www.microsoft.com
PING www.microsoft.akadns.net (207.46.230.229) from 64.22.132.134 : 56(84)
bytes of data.

--- www.microsoft.akadns.net ping statistics ---
50 packets transmitted, 0 packets received, 100% packet loss


This is ok, but it sent 53 packets though I asked to send only 50:
# ping -f -c 50 -n www.yahoo.com
PING www.yahoo.akadns.net (204.71.200.75) from 64.22.132.134 : 56(84) bytes
of data.
....
--- www.yahoo.akadns.net ping statistics ---
53 packets transmitted, 50 packets received, 5% packet loss
round-trip min/avg/max/mdev = 18.959/19.612/22.615/0.688 ms

But this is not fine:
# ping -f -c 5 -n www.microsoft.com
PING www.microsoft.akadns.net (207.46.230.229) from 64.22.132.134 : 56(84)
bytes of data.
...................................................................................................................................................................................................................................................................................................................................................................................................................................................^C
--- www.microsoft.akadns.net ping statistics ---
435 packets transmitted, 0 packets received, 100% packet loss

# ping -f -c 5 -n 10.50.1.10       
Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP
PING 10.50.1.10 (10.50.1.10) from 24.130.93.25 : 56(84) bytes of data.
Warning: no SO_RCVTIMEO support, falling back to poll
.................E.................E..................................E.................E..................................E.................E.................E.................E.................E.................E.................E.................E.................E.................E.................E.................E..................................E.................E.................E.................E.................E.................E.................E.................E.................E.................E.................................E.................E.................E.................E...................E................................E................E.................E.................E.................E.................E.................E...................................................E.................E......................E..............................................E..................................E.................E.................E.................E.................E.................E.................E..................................E.................E...................................E................E.................E.................E.................E...................................................E...................................................E.................E...................................................E..................................E.................E.................E.................E..................................E.................E.................E..................E................E.................E.................E.................E.................E.................E.................E..................................E.................E.................E..................................E.................E.................E..................................E..................................E..................E...................................................................................E................E.................E.................................E...................................................E.................E.................E.................E..................................E.................E.................E..................................E.................E.................E.................E.................E..................................E..................................................E.................E.................E.................E.................E.................E.................E.................E..................................................E.................E.................E.................E.................E.................E..................E......................^C
--- 10.50.1.10 ping statistics ---
2750 packets transmitted, 0 packets received, +116 errors, 100% packet loss



This appears to have been broken for quite some time.

Comment 1 Glen Foster 2001-01-18 21:24:16 UTC
This defect is considered MUST-FIX for Florence Gold release

Comment 2 Jeff Johnson 2001-01-19 18:29:42 UTC
Add -w 1 to the command line. There are beaucoup bugs in bugzilla describing
variants of
this problem, basically you're expecting netkit ping behavior but Red Hat uses
ANK's
ping.


Note You need to log in before you can comment on or make changes to this bug.