[avahi] Resolution of names to IPv6 link-local addresses

Paul Aurich paul at darkrain42.org
Sat Mar 6 08:45:10 PST 2010

On 2010-03-06 06:36, Ernesto Silva wrote:
> Hi Paul, ping6 needs the "-I eth0" parameter, change eth0 and put the
> name of your interface.

Yes, I'm aware that I can do this, but I shouldn't *need* to (nor do all
programs have such an option; ping6 was just easy to test with).

Avahi has the interface information and passes it to nss-mdns over the
socket (nss-mdns ignores it), but I don't know whether to consider this
a bug in nss-mdns or avahi (arguably it's easier to fix this once on
Avahi's side, but that might break things that validate Avahi's response
and can't parse "%2" or "%eth0" appended to link-local addresses).

> For the first part try to use wireshark, sniff the network traffic and
> see if the mdns queries ask for "A" (ipv4) or "AAAA" (ipv6) records.

I did this as part of my initial debugging.  AAAA lookups are sent out
over both IPv6 and IPv4 (at that point, nsswitch.conf contained
mdns_minimal and mdns) and I see the responses coming back.  strace on
the avahi-daemon process also confirmed it received the responses, and
gdb breakpoints at various places (in avahi-daemon) confirmed the
responses were /not/ being processed to the point of returning the IPs
either via dbus (for avahi-resolve) or the nss-mdns socket (for ping6).

> There are more than one method to resolve name into IP address, to be
> sure to use your nsswitch.conf configuration please try with "getent
> hosts durkon.local" and tell us how it works.

As I mentioned previously, tcpdump clearly indicates that resolution was
attempted via multicast, but avahi-daemon never passes the results back
to avahi-resolve/nss-mdns.

To allay any further concerns, this is what was in /etc/nsswitch.conf
when I was having issues:
hosts:          files mdns_minimal [NOTFOUND=return] dns mdns

And no, "durkon.local" is not listed in /etc/hosts.

> Best regards,
> Ernesto.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/avahi/attachments/20100306/dbee587d/attachment.pgp>

More information about the avahi mailing list