Mailinglist Archive: opensuse-factory (355 mails)

< Previous Next >
Re: [opensuse-factory] getent hosts localhost -> ::1
06.03.2020 17:03, Michael Ströder пишет:
HI!

After upgrade to Tumbleweed 20200304 host name localhost insists on IPv6
address no matter what's in /etc/hosts:

# getent hosts localhost
::1 localhost

Relevant lines from /etc/hosts attached below.


You are aware that Linux is using /etc/nsswitch.conf to decide where to
lookup name-to-address mapping, are not you? So /etc/hosts is relevant
only to the extent that there is no IPv6 localhost entry.

getent tries to find IPv6 address first. One of your configured NSS
backends returns ::1 for localhost. It is up to you to find out which
NSS backend does it. If you are truly interested, start with removing
them one by one until localhost becomes IPv4 again.

How can I disable that without completely switching off IPv6?


It is completely to unrelated whether IPv6 is active in kernel.

Ciao, Michael.

----------------- bite here -----------------
127.0.0.1 localhost

# special IPv6 addresses
::1 localhost6 ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts


--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
References