Skip to content
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

Recognise new IPv6 non-global range from IETF RFC 9602 #135745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bardiharborow
Copy link
Contributor

@bardiharborow bardiharborow commented Jan 19, 2025

This PR adds the 5f00::/16 range defined by IETF RFC 9602 to those ranges which Ipv6Addr::is_global recognises as a non-global IP. This range is used for Segment Routing (SRv6) SIDs.

See also: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
Unstable tracking issue: #27709

@rustbot
Copy link
Collaborator

rustbot commented Jan 19, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @joboet (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 19, 2025
@rust-log-analyzer

This comment has been minimized.

This commit adds the 5f00::/16 range defined by RFC9602 to those ranges which Ipv6Addr::is_global recognises as a non-global IP. This range is used for Segment Routing (SRv6) SIDs.
@@ -1773,6 +1775,8 @@ impl Ipv6Addr {
&& !self.is_unspecified()
&& !self.is_documentation()
&& !self.is_benchmarking()
// Segment Routing (SRv6) SIDs (`5f00::/16`)
&& !matches!(self.segments(), [0x5f00, ..])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐃 I haven't changed this to something potentially more comprehensive like self.is_unicast() && !self.global() since that would change behaviour for some other ranges, but it may be a good target for another PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #85604 -- I think given those open questions, we should not change this at all right now.

(The last is_global update in #119006 also avoided this.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will have a look and re-request review when this is ready.

@rustbot author

@bardiharborow bardiharborow changed the title Recognise new IPv6 non-global range from RFC9602 Recognise new IPv6 non-global range from IETF RFC 9602 Jan 20, 2025
@bardiharborow
Copy link
Contributor Author

@rustbot label A-io

@rustbot rustbot added the A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` label Jan 20, 2025
@joboet
Copy link
Member

joboet commented Jan 24, 2025

This isn't my area of expertise, sorry...
r? libs

@rustbot rustbot assigned cuviper and unassigned joboet Jan 24, 2025
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 25, 2025
@bors
Copy link
Contributor

bors commented Jan 27, 2025

☔ The latest upstream changes (presumably #135937) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants