invalid ipv6 nameserver in resolv.conf breaks resolver

Bug #1288644 reported by Andrew Beresford
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

If you have an IPv6 nameserver listed in /etc/resolv.conf and it does not respond to lookups, or is inaccessible for another reason, the resolver will not check subsequent IPv4 entries.

You can test this by adding an unresponsive IPv6 nameserver to your /etc/resolv.conf. In this example I've picked on 2001::1.

nameserver 2001::1
nameserver 8.8.8.8

And do;

 getent hosts www.google.com

You will get no response. The behaviour will change slightly dependent on whether your machine has a route for IPv6 traffic or not. If not, it will return immediately, if it does, it will return after the normal timeout for a DNS server.

Removing the unavailable IPv6 server works around the problem and allows the machine to talk to the IPv4 nameservers as normal.

I've tested this on saucy and tahr, identical behaviour on both. 2.18-0ubuntu7 and 2.19-0ubuntu2 on tahr and 2.17-93ubuntu4 on saucy.

== BONUS FEATURE ==

If you encode the IPv4 address in IPv6 notation, everything works!

Use the following in /etc/resolv.conf:

nameserver 2001::1
nameserver 0:0:0:0:0:ffff:808:808

which is logically identical to the entry above, and everything works as expected.

Revision history for this message
Andrew Beresford (beezly) wrote :

I've just tested this against the current utopic libc (2.19-4ubuntu1) and the bug isn't reproducible. It does still exist in 14.04 though.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eglibc (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.