Skip to content
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

Only recognisies IPv6 addresses, not IPv6 resolving hostnames #3

Closed
mhmeadows63 opened this issue Sep 6, 2016 · 1 comment
Closed
Assignees
Labels

Comments

@mhmeadows63
Copy link

mhmeadows63 commented Sep 6, 2016

@grongor
I suggest an adjustment something like:

-   self.host = args.host
-   self.is_ipv6 = args.host.find(':') != -1
+   self.addr = socket.getaddrinfo(args.host, 0)
+   self.is_ipv6 = self.addr[0][0] == socket.AF_INET6

-   s.connect_ex((self.host, port))
+   s.connect_ex((self.addr[0][4][0], port))
@grongor grongor added the bug label Sep 8, 2016
@grongor grongor self-assigned this Sep 8, 2016
@grongor
Copy link
Owner

grongor commented Sep 8, 2016

Yeah, of course :) It's kinda hard for me - I don't have any network to test the IPv6 on ... yep, lame, I know :D Can you take a look at #4 and see if it works for you? Thanks :)

@grongor grongor closed this as completed in #4 Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants