socket.gethostbyaddr does not work with IPv6 on Solaris
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
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
- gh-157498
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 socket.gethostbyaddr 入口点开始,检查 CPython 在 Solaris 上如何调用 gethostbyaddr_r。将该路径与 issue 中描述的特定于平台的 getipnodebyaddr 行为进行比较,并查看关联的 PR gh-157498。当 IPv6 反向查找能够在 Solaris 上正常工作且不破坏现有 IPv4 行为时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- networking
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100