-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Incorrect ipaddress.ip_address.reverse_pointer with improved textual representation of IPv4-mapped IPv6 addresses #123409
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
Comments
I think there is indeed an issue with the reverse pointer of IPv6. It does not match the RFC. I'll provide a patch. |
@kellyjonbrazil Godd catch! Thank you for logging that, and I apologize for missing it during testing. |
…dresses (pythonGH-123419) Fix functionality that was broken with better textual representation for IPv4-mapped addresses (pythongh-87799) (cherry picked from commit 77a2fb4) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…ddresses (GH-123419) (#123606) gh-123409: fix `IPv6Address.reverse_pointer` for IPv4-mapped addresses (GH-123419) Fix functionality that was broken with better textual representation for IPv4-mapped addresses (gh-87799) (cherry picked from commit 77a2fb4) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Thanks @kellyjonbrazil for the report and @picnixz for the patch! |
You're welcome! (I hope that I didn't misread the RFC because it doesn't tell anything about mapped addresses; however I assumed that we first map IPv4 to IPv6 before taking its reverse pointer, which is what was being done in 3.12.5) |
Bug report
Bug description:
I'm seeing strange results with python 3.13 with the
ipaddress.ip_address.reverse_pointer
attribute with the new improved textual representation of IPv4-mapped IPv6 addresses:IP Address:
::FFFF:192.168.1.35
Results in a
reverse_pointer
of:5.3...1...8.6.1...2.9.1.f.f.f.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
instead of the old:
3.2.1.0.8.a.0.c.f.f.f.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
Python 3.13:
Python 3.12:
I'm not sure which one is more valid or if a pointer record is even relevant in the context of mapped addresses. The original way seems more correct to me if nothing for the fact that there are strange extra dots in the new output.
This is related to:
Issue: #87799
PR: #29345
Originally posted by @kellyjonbrazil in #87799 (comment)
CPython versions tested on:
3.13
Operating systems tested on:
Linux
@opavlyuk
Linked PRs
IPv6Address.reverse_pointer
output #123419IPv6Address.reverse_pointer
for IPv4-mapped addresses (GH-123419) #123606The text was updated successfully, but these errors were encountered: