Bug 10313 - Scan to Samba Remote PC Fails for IPV6 addresses
Summary: Scan to Samba Remote PC Fails for IPV6 addresses
Status: CLOSED WORKSFORME
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.6.20
Hardware: Other Windows 7
: P5 critical
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-09 04:36 UTC by Meena
Modified: 2021-06-28 18:31 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Meena 2013-12-09 04:36:57 UTC
Hi Samba-team,

We are migrating from Samba version 3.5.16 to 3.6.20. We are facing the below issue in 3.6.20,

Scan to Samba Remote PC(Windows7) fails for IPV6 addresses and the same PASSES for IPV4 addresses. When we execute "smbclient -L //IPv6Address -U Username" command line option "NT_STATUS_BAD_NETWORK_NAME" error is being thrown.

Could you please let us know if we are missing any smb.conf parameter or any other steps and conditions to be followed specially for IPV6 addresses.

We have already included "bind interfaces only=yes" and "interfaces=eth0" parameters in smb.conf file in order to make the Samba ports listen to IPV6 addresses also.

Kindly please let us know the suggestions for resolving this bug at the earliest.

Thank and Regards,
Meena
Comment 1 Jeremy Allison 2013-12-10 01:05:52 UTC
Can't reproduce this with the latest master or 3.6.x code on an IPv6-enabled system.

I get:

/usr/local/samba/bin/smbclient -L //AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:GGGG:HHHH -Uuser%password


Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.21-GIT-370e325-test]

	Sharename       Type      Comment
	---------       ----      -------
	tmp             Disk      
	bigdir          Disk      
	tmp1            Disk      
	IPC$            IPC       IPC Service (Samba 3.6.21-GIT-370e325-test)

AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:GGGG:HHHH is an IPv6 address -- no workgroup available

How are you reproducing this ?

Jeremy.
Comment 2 Meena 2013-12-10 12:43:47 UTC
(In reply to comment #1)
> Can't reproduce this with the latest master or 3.6.x code on an IPv6-enabled
> system.
> I get:
> /usr/local/samba/bin/smbclient -L //AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:GGGG:HHHH
> -Uuser%password
> Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.21-GIT-370e325-test]
>     Sharename       Type      Comment
>     ---------       ----      -------
>     tmp             Disk      
>     bigdir          Disk      
>     tmp1            Disk      
>     IPC$            IPC       IPC Service (Samba 3.6.21-GIT-370e325-test)
> AAAA:BBBB:CCCC:DDDD:EEEE:FFFF:GGGG:HHHH is an IPv6 address -- no workgroup
> available
> How are you reproducing this ?
> Jeremy.

Hello Jeremy,

Thank you for your response.

We are using Samba 3.6.20 and we had added "bind interfaces only=yes" and "interfaces=eth0" parameters in addition to the default parameters in smb.conf file.

Procedure:
1. Scan to Remote PC's File share (Windows-7) with IPV6 address fails to store the data in the remote PC as connection is getting refused.
2. smbclient -L //IPV6-address also fails with "Connection to //IPV6 address failed with NT_STATUS_BAD_NETWORK_NAM".

On debugging we found that getaddrinfo() is failing in util_net.c.

Only functionalities with respect to IPV4 addresses are working fine.

Thanks and Regards,
Meena
Comment 3 Jeremy Allison 2013-12-10 23:55:28 UTC
What platform are you running smbclient on ? getaddrinfo is working fine on my IPv6 (Linux based) client setup.

Jeremy.
Comment 4 Meena 2013-12-11 05:48:47 UTC
(In reply to comment #3)
> What platform are you running smbclient on ? getaddrinfo is working fine on my
> IPv6 (Linux based) client setup.
> 
> Jeremy.

Hello Jeremy,

Thank you for the kind response.

We are also using Linux based platform. Could you please share be the smb.conf which you are using? Also if any other configuration file which is meant specially for ipv6 support. Also we have enalbled "HAVE_IPV6" flag during compilation of Samba_3.6.20. Are there any other flags that are required? 

Also File Share access was not working with IPV6 address, we had added "interfaces" and "bind interfaces only" parameters to make it work fine.

As we are migrating from 3.5.x to 3.6.x, there must be major changes in 3.6.x which requires some additional parameters to be provided through smb.conf and other configuration files, hence could you please help us in providing the same.


Thanks and Regards,
Meena
Comment 5 Björn Jacke 2021-06-28 18:31:26 UTC
IPv6 is working fine these days, feel free to reopen if you see any error like this in recent 4.13 or 4.14 releases.