-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Some IPv4 and IPv4-mapped IPv6 properties don't match #122792
Comments
…Pv4 (GH-122793) Make IPv4-mapped IPv6 address properties consistent with IPv4.
…with IPv4 (pythonGH-122793) Make IPv4-mapped IPv6 address properties consistent with IPv4. (cherry picked from commit 76a1c5d) Co-authored-by: Seth Michael Larson <seth@python.org>
…with IPv4 (pythonGH-122793) Make IPv4-mapped IPv6 address properties consistent with IPv4. (cherry picked from commit 76a1c5d) Co-authored-by: Seth Michael Larson <seth@python.org>
…with IPv4 (pythonGH-122793) Make IPv4-mapped IPv6 address properties consistent with IPv4. (cherry picked from commit 76a1c5d) Co-authored-by: Seth Michael Larson <seth@python.org>
…with IPv4 (pythonGH-122793) Make IPv4-mapped IPv6 address properties consistent with IPv4. (cherry picked from commit 76a1c5d) Co-authored-by: Seth Michael Larson <seth@python.org>
Hey, I learned about this issue just today and, as a user of this API, I'd like to express some opposition to it. My reasons, in no particular order:
cc @gpshead |
I think we're lacking the motivating reason behind the change, @sethmlarson can explain more. Agreed with (2), we need a docs update. But the merged change does not make it inconsistent, the Regarding (3) / (4) do you have practical examples of actual code in use that does not want the new behavior? (got links?) That'd help reason about where this falls into breaking change vs bug fix categories. Some general background: We've gotten security reports over the years about the |
@jstasiak Thanks for the question, indeed the primary motivation for this change is security, specifically folks using IP address filtering before establishing a connection. Since an IPv4-mapped IPv6 address gets established as an IPv4 address I figured these properties should match the mapped IPv4 address and not the IPv6 address that's mostly being used for framing. If you have better guidance about this case, please share! |
@jstasiak Do you have an opinion on the above comment? Otherwise we will continue back-porting this change, we want to make sure we're not breaking any legitimate use-cases unintentionally. |
Bug report
Bug description:
The following properties on an
IPv6Address
don't match theirIPv4Address
counterparts when using an IPv6-mapped IPv4 address (ie::ffff:<ipv4>
):Proposed fix is to make all properties use their
IPv4Address
values for IPv4-mapped addresses.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: