ipaddress: IPv6Address.reverse_pointer produces an invalid name for an address with a scope id
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Bug report
Since gh-88178 (a2104b7ce), :attr:~ipaddress.IPv6Address.exploded includes
the %scope_id suffix. IPv6Address._reverse_pointer derives the pointer
from self.exploded and only strips :, so the scope id is reversed into
the name:
>>> import ipaddress
>>> ipaddress.IPv6Address('fe80::1%eth0').reverse_pointer
'0.h.t.e.%.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa'
A scope id is link-local and is not part of the address, so it must not appear
in the reverse DNS name. The correct value is the one for fe80::1:
>>> ipaddress.IPv6Address('fe80::1').reverse_pointer
'1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa'
Before a2104b7ce this raised :exc:~ipaddress.AddressValueError; it now returns
a malformed name silently.
Linked PRs
- gh-155837
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ipaddress.IPv6Address._reverse_pointer と、このレポートにある reverse_pointer の例から始めてください。scope_id サフィックスが IPv6Address.exploded にどのように入るかを確認し、fe80::1%eth0 の逆引き DNS 名がサフィックスなしのアドレスと一致することを検証してください。生成されたポインターにスコープ識別子が含まれず、以前の不正な出力が回帰テストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- networking
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100