-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial IPv6 support? #180
Comments
When you set |
@miketeo You are right, thank you, the port was wrong indeed. I cannot try with IPv6 right now, but I would guess that will solve the issue. |
It works if I use the IP address instead of the hostname, which has been specified in /etc/hosts. |
I can confirm there is an issue with IPv6. IPv4 is assumed to be the default, so if I try to connect to hosts over IPv6, I need to specify that. pysmb/python3/smb/SMBConnection.py Line 98 in 0b0b9a7
pysmb/python3/smb/SMBConnection.py Lines 111 to 113 in 0b0b9a7
Wouldn't it better to use self.sock = socket.create_connection(( ip, port ), timeout) Reference: https://docs.python.org/3/library/socket.html#socket.create_connection |
Is IPv6 supported?
Couldn't
sock_family
be detected automatically? Python 3 has theipaddress
module.When I set
sock_family
toAF_INET6
I get another error:is_direct_tcp
is set toTrue
as it looks to me that NetBIOS does not work in IPv6. Setting it toFalse
produces a timeout.smbclient
works just fine instead.The text was updated successfully, but these errors were encountered: