Skip to content

Commit

Permalink
Add RFC 9637 reserved IPv6 block 3fff::/20
Browse files Browse the repository at this point in the history
Signed-off-by: y5c4l3 <[email protected]>
  • Loading branch information
y5c4l3 committed Sep 19, 2024
1 parent 10de360 commit 9c44ccb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Lib/ipaddress.py
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,7 @@ class _IPv6Constants:
IPv6Network('2002::/16'),
IPv6Network('fc00::/7'),
IPv6Network('fe80::/10'),
IPv6Network('3fff::/20'),
]

_private_networks_exceptions = [
Expand Down
2 changes: 2 additions & 0 deletions Lib/test/test_ipaddress.py
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,8 @@ def testReservedIpv6(self):
self.assertTrue(ipaddress.ip_address('2001:30::').is_global)
self.assertFalse(ipaddress.ip_address('2001:40::').is_global)
self.assertFalse(ipaddress.ip_address('2002::').is_global)
# issue #124217: conform with RFC 9637
self.assertFalse(ipaddress.ip_address('3fff::').is_global)

# some generic IETF reserved addresses
self.assertEqual(True, ipaddress.ip_address('100::').is_reserved)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add RFC 9637 reserved IPv6 block ``3fff::/20`` in :mod:`ipaddress` module

0 comments on commit 9c44ccb

Please sign in to comment.