konqueror can not resolve 'localhost' when interface has no IP addr

Matthias Apitz guru at unixarea.de
Wed Apr 19 05:28:18 UTC 2017


I'm preparing myself to give some talk for which I need some multimedia
content. To not depend on Internet in the place of the conference, I
installed in my netbook (FreeBSD 12.0-CURRENT r314251, KDE 4.14, all
ports compiled from head) a local apache and normally

konqueror http://localhost/

works as it should, until (and lucky I tested this) the interface wlan0
has no IP addr assigned. In this case konqueror says that it can not
resolve 'localhost' (which of course is in /etc/hosts file and
/etc/nsswitch.conf says 'hosts: files dns'). 

It is enough to set some dummy IP into the interface with:

# ifconfig wlan0

and this makes konqueror happy resolving 'localhost'. I've watched this
with truss: /etc/nsswitch.conf is checked, but /etc/hosts not.

Firefox works in both cases, with and without IP addr in the interface.

Any idea what's causing this bug?

Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  ☎ +49-176-38902045

More information about the kde-freebsd mailing list