Mailinglist Archive: opensuse-factory (355 mails)

< Previous Next >
[opensuse-factory] Re: getent hosts localhost -> ::1
On 3/9/20 10:13 AM, Andreas Schwab wrote:
On Mär 06 2020, Michael Ströder wrote:

# getent hosts localhost

getent hosts uses gethostbyname, which is an obsolete interface. You
should use getent ahosts instead.

Hmm, even more confusing (but thanks for the hint)...

$ getent ahosts localhost
127.0.0.1 STREAM localhost
127.0.0.1 DGRAM
127.0.0.1 RAW

$ getent hosts localhost
::1 localhost

Background of my question:
I'm using ISC dhcpd (IPv4 mode) with LDAP backend.

In the dhcpd.conf I used:

ldap-server "localhost";

After recent Tumbleweed upgrade this did not work anymore.

Replacing it with using the IPv4 address works:

ldap-server "127.0.0.1";

I think the issue was caused by the unbound update. The DNS recursor is
now returning IPv4 and IPv6 addresses for localhost:

$ host localhost.
localhost has address 127.0.0.1
localhost has IPv6 address ::1

In theory ISC dhcpd should have been able to connect to ldap://::1 but
it did not work.

I have to dig a bit deeper...

Ciao, Michael.

P.S.: Yes, I know kea. But it does not support LDAP server as backend
yet. No, for now I don't want to migrate.
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups