GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-151749: Add 5f00::/16 (RFC 9602) and 100:0:0:1::/64 (RFC 9780) to ipaddress IPv6 private networks by tonghuaroot · Pull Request #151764 · python/cpython

Conversation

@tonghuaroot

@tonghuaroot tonghuaroot commented Jun 20, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Add the 5f00::/16 (RFC 9602) and 100:0:0:1::/64 (RFC 9780) special-purpose IPv6 ranges to ipaddress's _private_networks so is_global/is_private match the IANA registry.

Fixes #151749

Problem

Both ranges are listed in the IANA IPv6 Special-Purpose Address Registry with Globally Reachable = False, but ipaddress currently reports them as globally reachable:

  • 5f00::/16 — SRv6 SIDs, defined in RFC 9602 (Globally Reachable: False).
  • 100:0:0:1::/64 — Dummy IPv6 Prefix, defined in RFC 9780 (Globally Reachable: False). Note this block is disjoint from the already-listed 100::/64 (RFC 6666 Discard-Only), so it is not currently covered.

Before this change IPv6Address.is_global returns True (and is_private returns False) for addresses in both blocks, which is incorrect.

Fix

Adds the two networks to _IPv6Constants._private_networks, alongside the existing not-globally-reachable IPv6 entries. This follows the precedent set by CVE-2024-4032 / gh-113171 and gh-124217 (3fff::/20, RFC 9637), which added sibling ranges to these same tables.

Scope: This PR is intentionally limited to _private_networks. It does not touch _private_networks_exceptions; the related 2001:1::3/128 (RFC 9665) exception is handled separately in #151050 and is deliberately left unchanged here.

Behaviour (stock vs. patched)

Address stock is_global patched is_global patched is_private
5f00:: True False True
5f00::1 True False True
5f00:ffff:ffff:ffff:ffff:ffff:ffff:ffff True False True
100:0:0:1:: True False True
100:0:0:1:ffff:ffff:ffff:ffff True False True
5eff:ffff:ffff:ffff:ffff:ffff:ffff:ffff (adjacent below) True True False
5f01:: (adjacent above) True True False
100:0:0:2:: (adjacent) True True False

Addresses immediately adjacent to each new block are unchanged. A regression test covering both the changed and adjacent addresses is added to testReservedIpv6, and a Misc/NEWS.d entry is included.

  • Issue: ipaddress: Two more IPv6 ranges (RFC 9602, 9780) missing from _private_networks #151749

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tonghuaroot
pythongh-151749: Add 5f00::/16 (RFC 9602) and 100:0:0:1::/64 (RFC 978…
928525f
…0) to ipaddress IPv6 private networks
@bedevere-app bedevere-app Bot added the awaiting review label Jun 20, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jun 20, 2026
ipaddress: Two more IPv6 ranges (RFC 9602, 9780) missing from _private_networks #151749
Open
@tonghuaroot
pythongh-151749: Match surrounding comment and test style
0e67dce
aisk
aisk approved these changes Jun 20, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Jun 20, 2026
@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aisk aisk aisk approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review stale Stale PR or inactive for long period of time.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ipaddress: Two more IPv6 ranges (RFC 9602, 9780) missing from _private_networks

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@tonghuaroot @aisk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.