[systemd-devel] nss-myhostname: why don't loopback interfaces appear?
Dimitri John Ledkov
dimitri.j.ledkov at intel.com
Wed Jun 10 03:24:18 PDT 2015
On 3 June 2015 at 06: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?
>
So in my case, I don't have /etc/hosts file at all and use
nss-myhostname et.al. modules. Specifically I have nsswitch.conf like
so:
hosts: files myhostname resolve dns mymachines
My naive expection for the following call:
# getent hosts `hostname`
To return something like, e.g.:
127.0.1.1 $hostname $hostname.$domain
But instead I get:
fe80::5054:ff:fe12:3456 $hostname
Whist it is perfectly valid, it's atypical from "usual" setups
elsewhere. And subtle things seem to rely on the "usual" setup, e.g.
Erlang Port Mapper Daemon / zerromq fail to start, as hostname ->
127.0.*.* -> localhost mappings are kind of expected. (there were
other things as well, that were fixed up by other people)
Sure, I could fix the world to connect/resolve localhost, instead of
`hostname`, but for the time being this situation became defacto
expected =( I would like to see an option to myhostname module to
return 127.0.1.1 when asking for current machine `hostname`.
--
Regards,
Dimitri.
Pura Vida!
https://clearlinux.org
Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.
More information about the systemd-devel
mailing list