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

use of socket.inet_aton prevents ipv6 initialization #414

Open
craigcabrey opened this issue Jun 23, 2022 · 0 comments
Open

use of socket.inet_aton prevents ipv6 initialization #414

craigcabrey opened this issue Jun 23, 2022 · 0 comments

Comments

@craigcabrey
Copy link

In the case of an IPv6 only environment, or a dual stack environment where the advertise address is being supplied, we will fail to initialize:

>>> addr = socket.inet_aton('::1')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: illegal IP address string passed to inet_aton

this happens here:

addresses=[socket.inet_aton(self.state.address)],

It's a rather niche case, but would be good to replace this usage with socket.inet_pton: https://docs.python.org/3/library/socket.html#socket.inet_pton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant