Skip to content

socket.gethostbyaddr does not work with IPv6 on Solaris #157497

Description

@kulikjak

Bug report

Bug description:

The documentation suggests that socket.gethostbyaddr supports both IPv4 and IPv6:
https://docs.python.org/3/library/socket.html#socket.gethostbyaddr
however, gethostbyaddr_r on Solaris does not support IPv6.

Solaris/Illumos provide platform-specific getipnodebyaddr function which can be used to lookup IPv6 addresses.

I did not test this with Illumos, but the man page suggest the same behavior as with Oracle Solaris:
https://www.smartos.org/man/3nsl/gethostbyaddr_r

"the functions described in the following cannot be used with applications targeted to work with IPv6."

CPython versions tested on:

CPython main branch, 3.13, 3.11

Operating systems tested on:

Other

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions