This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 24261 - ping flood count flag broken with ICMP unreachable
ping flood count flag broken with ICMP unreachable
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: iputils (Show other bugs)
7.1
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Crutcher Dunnavant
Aaron Brown
Florence Gold
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-18 00:30 EST by Thornton Prime
Modified: 2013-05-06 13:15 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-18 16:24:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Thornton Prime 2001-01-18 00:30:01 EST
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 16:24:16 EST
This defect is considered MUST-FIX for Florence Gold release
Comment 2 Jeff Johnson 2001-01-19 13:29:42 EST
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.