Ernesto Silva
2010-Feb-10 22:42 UTC
[Samba] Name to address resolution: A and AAAA records
Hi, I'm installing a few linux clients and one server with samba. The network addresses are IPv6 in the .local domain. The avahi-daemon implements de MDSN resolver. A standard "ping6 -Ieth0 servername.local" generates a "AAAA" query packet which is correctly responded by the servername.local machine and the ping works fine. "smbclient -L servername.local" generates a "A" query packet, which de avahi-daemon can't respond because (I think) it's a IPv4 query over a IPv6 channel, and there is not IPv4 address to answer. Shouldn't smbclient query for a "AAAA" record over a IPv6 channel? Please, tell me if you believe this question is not for this list. Best regards, Ernesto Silva.
Jeremy Allison
2010-Feb-10 22:58 UTC
[Samba] Name to address resolution: A and AAAA records
On Wed, Feb 10, 2010 at 08:42:48PM -0200, Ernesto Silva wrote:> Hi, I'm installing a few linux clients and one server with samba. The > network addresses are IPv6 in the .local domain. > > The avahi-daemon implements de MDSN resolver. > > A standard "ping6 -Ieth0 servername.local" generates a "AAAA" query packet > which is correctly responded by the servername.local machine and the ping > works fine. > > "smbclient -L servername.local" generates a "A" query packet, which de > avahi-daemon can't respond because (I think) it's a IPv4 query over a IPv6 > channel, and there is not IPv4 address to answer. > > Shouldn't smbclient query for a "AAAA" record over a IPv6 channel?Modern smbclients just does a getaddrinfo() call, we don't explicitly ask for IPv4 or IPv6. What we get back is what we get back. What version of Samba on what platform ? Jeremy.
Jeremy Allison
2010-Feb-11 00:01 UTC
[Samba] Name to address resolution: A and AAAA records
On Wed, Feb 10, 2010 at 09:44:30PM -0200, Ernesto Silva wrote:> Jeremy, I've downloaded the source of 3.3.2 version, the official one, not the > one used by Ubuntu. > I've taken a look at the following: > > file: source/libsmb/namequery.c > function: static NTSTATUS resolve_hosts(const char *name, int name_type, struct > ip_service **return_iplist, int *return_count) > > Apparently resolve_hosts funcion can manage IPv6 addresses, it depends on > HAVE_IPV6 macro definition. > My samba daemon sais that the compilation option HAVE_IPV6 is defined (smbd > -b).Then it's the fault of your resolver. (Keeping the CC:on list so I'm not a private support channel). Jeremy.