Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
The manpage of ping doesn't list maximum allowed packet size. Experimenting with it to test fragmentation, I've found that ping behaves inconsistently. It even hangs under some circumstances ...
Version-Release number of selected component (if applicable):
iputils-20121221-6.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1. ping -c 1 -s 65507 localhost ; echo $?
2. ping -c 1 -s 65508 localhost ; echo $?
3. ping -c 1 -s 65528 localhost ; echo $?
4. ping -c 1 -s 65529 localhost ; echo $?
Actual results:
1.
PING localhost (127.0.0.1) 65507(65535) bytes of data.
65515 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.539 ms
--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.539/0.539/0.539/0.000 ms
0
2.
WARNING: packet size 65508 is too large. Maximum is 65507
PING localhost (127.0.0.1) 65508(65536) bytes of data.
ping: local error: Message too long, mtu=10000
--- localhost ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
1
3.
WARNING: packet size 65528 is too large. Maximum is 65507
PING localhost (127.0.0.1) 65528(65556) bytes of data.
ping: sendmsg: Message too long
^C
--- localhost ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
1
^ ping hangs in this case, note ctrl+c sent!
4.
ping: packet size too large: 65529
2
Expected results:
1.
PING localhost (127.0.0.1) 65507(65535) bytes of data.
65515 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.539 ms
--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.539/0.539/0.539/0.000 ms
0
2.
ERROR: packet size 65508 is too large. Maximum is 65507
2
3.
ERROR: packet size 65528 is too large. Maximum is 65507
2
4.
ERROR: packet size 65529 is too large. Maximum is 65507
2
Additional info:
It'd be nice to mention the maximum size within the manpage too, if that's a constant. If it is system dependent, then at least some clue how the maximum size is computed would be useful.
The minor inconsistencies and the hang will be fixed by bz#1273336. I don't see a reason why the maximum size should be documented in the man page though, since the MTU and the ICMP header size of the given network are always known...
Behavior with the new version:
$ ping -c 1 -s 65507 localhost ; echo $?
PING localhost(localhost (::1)) 65507 data bytes
65515 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.085 ms
--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.085/0.085/0.085/0.000 ms
0
$ ping -c 1 -s 65508 localhost ; echo $?
PING localhost(localhost (::1)) 65508 data bytes
65516 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.067 ms
--- localhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.067/0.067/0.067/0.000 ms
0
$ ping -c 1 -s 65528 localhost ; echo $?
PING localhost(localhost (::1)) 65528 data bytes
ping: local error: Message too long, mtu=65536
--- localhost ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
1
$ ping -c 1 -s 65529 localhost ; echo $?
PING localhost(localhost (::1)) 65529 data bytes
ping: local error: Message too long, mtu=65536
--- localhost ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
1
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHEA-2016-2185.html