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 return value of ping for ipv4 and ipv6 isn't the same
Version-Release number of selected component (if applicable):
ping utility, iputils-s20160308
3.10.0-481.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. add unreachable route for ipv4
2. ping unreachable dst
3. add unreachable route for ipv6
4. ping6 unreachable dst
Actual results:
return value in 2 is 2
return value in 4 is 1
Expected results:
the return value should be the same 2
Additional info:
[root@ibm-x3250m5-01 route_type]# uname -a
Linux ibm-x3250m5-01.rhts.eng.pek2.redhat.com 3.10.0-481.el7.x86_64 #1 SMP Wed Jul 27 18:24:27 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@ibm-x3250m5-01 route_type]# ping6 -V
ping utility, iputils-s20160308
[root@ibm-x3250m5-01 route_type]# ip route add unreachable 2000::/64
[root@ibm-x3250m5-01 route_type]# ping6 2000::1 -c 1
PING 2000::1(2000::1) 56 data bytes
ping: sendmsg: No route to host
--- 2000::1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
[root@ibm-x3250m5-01 route_type]# echo $?
1
<======1 here
[root@ibm-x3250m5-01 route_type]# ping 192.168.0.1 -c 1
connect: No route to host
[root@ibm-x3250m5-01 route_type]# echo $?
2
<========2 here
When use ping on rhel7.2GA whose version is iputils-s20121221,the return value is 2:
[root@dhcp-13-64 ~]# uname -a
Linux dhcp-13-64.nay.redhat.com 3.10.0-481.el7.x86_64 #1 SMP Wed Jul 27 18:24:27 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@dhcp-13-64 ~]# ping -V
ping utility, iputils-s20121221
[root@dhcp-13-64 ~]# ping6 2000::1 -c 1
connect: No route to host
[root@dhcp-13-64 ~]# echo $?
2
I'm getting "connect: Network is unreachable" in both cases and the return value is 2. Please specify *exactly* how you set up the network in both cases.
Comment 3Jaroslav Škarvada
2016-08-03 13:10:30 UTC
(In reply to Jan Synacek from comment #2)
> I'm getting "connect: Network is unreachable" in both cases and the return
> value is 2. Please specify *exactly* how you set up the network in both
> cases.
Hi Jan,
No special set up, just as the steps in the Description:
Boot up the system, then add unreachable route.
ip route add unreachable 2000::/64
ping6 2000::1 -c 1
Do you use the same iputils as mine:iputils-s20160308?
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://access.redhat.com/errata/RHBA-2017:1987