Bug 1113082 - ping returns odd results with options inet6 in resolv.conf
Summary: ping returns odd results with options inet6 in resolv.conf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: iputils
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Jan Synacek
QA Contact: Robin Hack
URL:
Whiteboard:
Depends On:
Blocks: 1210331
TreeView+ depends on / blocked
 
Reported: 2014-06-25 12:11 UTC by Ronald van Zantvoort
Modified: 2015-07-22 05:49 UTC (History)
3 users (show)

Fixed In Version: iputils-20071127-20.el6
Doc Type: Bug Fix
Doc Text:
Cause: When domain name translation was forced to be done over IPv6, the output of the "ping" command was not correct, as it displayed an incorrect IP address that it got from the internal library, because a wrong call was used. Consequence: IP addresses were not correctly translated from domain names. The wrong values were then displayed in the output. Fix: Underlying logic was modified to use gethostbyname2() instead of gethostbyname(). Result: Domain name to IP address translation now works correctly and the output is then correct.
Clone Of:
: 1210331 (view as bug list)
Environment:
Last Closed: 2015-07-22 05:49:54 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1251 normal SHIPPED_LIVE iputils bug fix update 2015-07-20 17:50:08 UTC
Red Hat Bugzilla 1096415 None CLOSED ping returns localhost with options inet6 set in resolv.conf 2018-09-03 06:43:49 UTC

Description Ronald van Zantvoort 2014-06-25 12:11:04 UTC
Description of problem:
Identical to F20 bug #1096415, ping doesn't bother to specifically ask for an IPv4 address nor does it check whether it received one.
With 'options inet6' ping will ask for 'an address' rather than 'an IPv4 address' and will receive an IPv6 one.
Therefore, the IPv6 address is parsed away as an IPv4 address and that get's pinged.
The issue is resolved in later versions of iputils.

Version-Release number of selected component (if applicable):
iputils-20071127

How reproducible:
1. Add 'options inet6' to /etc/resolv.conf
2. Ping a host with at least one AAAA record

Actual results:
strange IP address is being pinged.

Expected results:
The correct IP address should be pinged.

Additional info:
Working/Expected situation:
/etc/resolv.conf:
nameserver 8.8.8.8

sys# dig +short -t A www.pcextreme.nl
pcextreme.nl.
109.72.87.211

sys# ping www.pcextreme.nl
PING pcextreme.nl (109.72.87.211) 56(84) bytes of data.
(...)

Broken situation:
/etc/resolv.conf:
options inet6
nameserver 8.8.8.8

sys# dig +short -t A www.pcextreme.nl
pcextreme.nl.
109.72.87.211

sys# ping www.pcextreme.nl
PING pcextreme.nl (42.0.15.16) 56(84) bytes of data.
(...)

Comment 6 errata-xmlrpc 2015-07-22 05:49:54 UTC
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/RHBA-2015-1251.html


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