[avahi] getaddrinfo() access to avahi problem

Ernesto Silva erniesilva at gmail.com
Wed Feb 17 13:27:09 PST 2010

> Hmm, to me it looks as if Samba does not actually ask for the IPv6
> addresses but goes for IPv4 right-away. nss-mdns is IPv6 capable, but
> it will only forward what the apps ask for. Which means that if no
> request happens on the network it's Samba which isn't asking.
> Lennart
Hi Lennart, thanks for the response, I believe the problem is the invocation
of getaddrinfo or something inside it.

In the Samba source code the file source/libsmb/namequery.c invokes
getaddrinfo as follows:

       ret = getaddrinfo(name, NULL, &hints, &ailist);

where "name" point to the hostname to resolve, "hints" is zeroed at the
begining and then initialized with ai_socktype with SOCK_STREAM, ai_flags
with AI_ADDRCONFIG and if the macro HAVE_IPV6 is not defined it loads
ai_family with AF_INET (at the cpp level). I've checked the compilation
parameters with "smbd -b" and HAVE_IPV6 is defined, so ai_family should be
zero and AF_UNSPEC is defined as zero.

I'm trying to do some tests with my own peace of code and if I found
something "funny" I'll let the list know.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/avahi/attachments/20100217/550c4eee/attachment.html 

More information about the avahi mailing list