[systemd-devel] nss-myhostname: why don't loopback interfaces appear?
Lennart Poettering
lennart at poettering.net
Tue Jun 2 23:01:07 PDT 2015
On Wed, 03.06.15 15:40, Daurnimator (quae at daurnimator.com) wrote:
> I was playing around with nss, and found that my loopback interface ip
> doesn't appear from nss-myhostname.
> Rather, my other ones do.
> Furthermore, unless I request IPv4, link-local IPv6 addresses are
> returned. Is this expected?
We order the returned addresses by scope. Global addresses are
placed first, local ones last.
We return addresses on the loopback device only when there's no other
address known. And even then we'll return 127.0.0.2 rather than
127.0.0.1, to avoid confusing software that expects "localhost" mapping
only to 127.0.0.1 and vice versa.
Also see nss-myhostname(8).
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list