Bug 24261
| Summary: | ping flood count flag broken with ICMP unreachable | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Thornton Prime <thornton> |
| Component: | iputils | Assignee: | Crutcher Dunnavant <crutcher> |
| Status: | CLOSED NOTABUG | QA Contact: | Aaron Brown <abrown> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.1 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | Florence Gold | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2001-01-18 21:24:20 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This defect is considered MUST-FIX for Florence Gold release 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. |
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.