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.
Bug 789189 - Space after nameserver entry in /etc/resolv.conf causes failed DNS lookups with ping6
Summary: Space after nameserver entry in /etc/resolv.conf causes failed DNS lookups wi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: glibc
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jeff Law
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 703239
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-10 03:15 UTC by Jeff Law
Modified: 2016-11-24 15:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 703239
Environment:
Last Closed: 2012-06-20 12:09:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0763 0 normal SHIPPED_LIVE glibc bug fix and enhancement update 2012-06-19 20:35:39 UTC

Description Jeff Law 2012-02-10 03:15:12 UTC
+++ This bug was initially created as a clone of Bug #703239 +++

Description of problem:

If /etc/resolv.conf contains an IPv6 nameserver entry with a space after the IP address, then clients only try to resolve the entry via the localhost, which fails because I don't have a nameserver locally:
# cat -e /etc/resolv.conf
nameserver 2001:470:20::2 $
# ping6 ipv6.google.com
unknown host
# strace -e connect ping6 ipv6.google.com
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("0.0.0.0")}, 28) = 0
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("0.0.0.0")}, 28) = 0
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("0.0.0.0")}, 28) = 0
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("0.0.0.0")}, 28) = 0
unknown host
# 

I'd guess the extra white space causes the resolver to treat the entry as a hostname or some other invalid entry.

This caused me some confusion until I worked out I had an extra space at the end of the line, because the "dig" and "host" tools were working correctly (they don't use the glibc resolver).

Version-Release number of selected component (if applicable):
Seen in RHEL5.1 and RHEL5.4

How reproducible:
Always

Steps to Reproduce:
1. Enter a whitespace after the IPv6 address.
2. Try to ping6 a hostname
3.
  
Actual results:
"unknown host" and ping6 returns exit code 2.

Expected results:
Normal ping output.

Additional info:

Comment 1 Jeff Law 2012-02-10 03:18:51 UTC
It's a relatively simple patch for the resolv.conf parsing code.  Proposing for RHEL 6.3.

Comment 4 errata-xmlrpc 2012-06-20 12:09:38 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.

http://rhn.redhat.com/errata/RHBA-2012-0763.html


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