Modify

Opened 5 years ago

Last modified 3 years ago

#12384 new defect

default /etc/hosts does not include "::1 localhost", IPv6 localhost queries fail

Reported by: michael+openwrt@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: ipv6 Cc: maddes

Description

I noticed that an application complained about not being able to resolve localhost via IPv6, and indeed, my OpenWrt does not reply the IPv6 localhost address ::1:

midna ~ $ dig -t AAAA localhost @192.168.1.1

; <<>> DiG 9.8.1-P1 <<>> -t AAAA localhost @192.168.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32704
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;localhost.			IN	AAAA

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Sat Oct 27 22:38:27 2012
;; MSG SIZE  rcvd: 27

midna ~ $ dig -t A localhost @192.168.1.1   

; <<>> DiG 9.8.1-P1 <<>> -t A localhost @192.168.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6183
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;localhost.			IN	A

;; ANSWER SECTION:
localhost.		0	IN	A	127.0.0.1

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Sat Oct 27 22:38:31 2012
;; MSG SIZE  rcvd: 43

This is due to trunk/package/base-files/files/etc/hosts only containing the line "127.0.0.1 localhost", while it should contain at least:

127.0.0.1 localhost
::1 localhost

Can you please fix this for the next release? Thanks!

Attachments (0)

Change History (6)

comment:1 Changed 5 years ago by michael+openwrt@…

This is still a problem with trunk and has been reported 7 months ago (I just ran into it again with a new router).

I don't see why this is not yet changed? It is a trivial change with a very low chance of breaking anything (I don't know of any linux software which does not support AAAA records by now). Plus, every linux distribution ships with such a setup.

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:3 Changed 3 years ago by mail+openwrt@…

Still not fixed in Barrier Breaker 14.07

comment:4 Changed 3 years ago by maddes

  • Cc maddes added

comment:5 Changed 3 years ago by maddes

  • Milestone changed from Barrier Breaker 14.07 to Chaos Calmer (trunk)

comment:6 Changed 3 years ago by eric

The following file sample meets the expectation of most network tools.

#
# The name 'localhost' must be first for IP4/IP6 loopback
# This ensures correct default name for pseudo rDNS
#
127.0.0.1 localhost
::1       localhost localhost6 ip6-localhost
#
# Some programs look for these and nice to have in logs
#
fe00::    ip6-localnet
ff00::    ip6-mcastprefix
ff02::1   ip6-allnodes
ff02::2   ip6-allrouters
ff02::3   ip6-allhosts

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.