python / python/cpython

socket.gethostbyaddr does not work with IPv6 on Solaris

Aperta
#157,497 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

extension-modules OS-unsupported type-bug
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Parti dal punto di ingresso socket.gethostbyaddr e verifica come CPython chiama gethostbyaddr_r su Solaris. Confronta questo percorso con il comportamento specifico della piattaforma di getipnodebyaddr descritto nell’issue e esamina la PR collegata gh-157498. Il lavoro è completato quando le ricerche inverse IPv6 funzionano su Solaris senza compromettere il comportamento IPv4 esistente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
networking
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.