Given a local hostname of foo and a multicast DNS install (net-misc/howl in
this
case), it should be possible to "ping foo.local" and get a ping of the
localhost.
With nscd running, this fails for me. Stopping nscd allows it to work,
restarting nscd causes it to stop again. I'm not familiar with how the nscd
stuff hooks in to the libc resolution routines, but it seems to override
/etc/host.conf with resolution based on /etc/nsswitch.conf.
Installing a libnss_mdns in /lib/ and putting something in /etc/nsswitch.conf
to
cause it to be used fixes this for me. This is an ebuild for an nss-mdns found
on the 'net. Please note that no security audit has been performed and this
has
been minimally tested on x86, with "stable x86" install (not ~x86).
Reproducible: Always
Steps to Reproduce:
1. emerge net-misc/howl; /etc/init.d/mDNSResponder start
2. ping foo.local (fails)
3. /etc/init.d/nscd stop; ping foo.local (succeeds)
4. /etc/init.d/nscd start; ping foo.local (fails)
5. /etc/init.d/nscd stop; ping foo.local (succeeds)
Actual Results:
Hostname resolution, as invoked by 'ping', fails to resolve mDNS requests in
.local whilst nscd is running, unless an NSS module providing mDNS service is
installed and configured.
Installing this new module and adding 'mdns4' to the hosts: line in
/etc/nsswitch.conf fixes things.
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$
inherit eutils
DESCRIPTION="Name Service Switch module for Multicast DNS"
HOMEPAGE="http://0pointer.de/lennart/projects/nss-mdns/"
SRC_URI="http://0pointer.de/lennart/projects/nss-mdns/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
IUSE=""
src_compile() {
econf --libdir=/lib
emake || die "Failed to make"
}
src_install() {
make DESTDIR=${D} install
dodoc README LICENSE doc/README.html doc/style.css
}