ipv6 /etc/hosts missing localhost hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubiquity |
Invalid
|
Undecided
|
Unassigned | ||
netbase (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
ubiquity (Ubuntu) |
Fix Released
|
Medium
|
Colin Watson |
Bug Description
Binary package hint: netbase
ipv6 /etc/hosts is missing the "localhost" hostname
#1: (How Discovered) Intrepid installed. In a case where a program could not find its server on ipv4 localhost, it queried for ipv6 localhost. A DNS AAAA query for "localhost" was subsequently seen going to the external DNS server instead of being resolved on the machine. When localhost was added to the ipv6 section of /etc/hosts, the external query was not made (and an associated blocking delay disappeared). (This is not a duplicate of bug 274995, but was exposed by it.)
#2: A fresh install of netbase_4.32ubuntu1 (intrepid) leaves /etc/hosts with this ipv6 section
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
However, the update_hosts_file() in the netbase.postinst script in that package indicates that section ought to look like this:
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
(It is important to note that the update_hosts_file() function adds to /etc/hosts only if "::1" is not found. It will not update the hosts file if the word "localhost" is missing from an existing line.)
#3: http://
SEVERITY/
The /etc/hosts file in an installed system is generated by netcfg. The version of netcfg in Intrepid, 1.44ubuntu4, specifically does add an ipv6 localhost entry. Here are the entries it creates:
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
What was in your /etc/hosts, if not this?