Skip to content

Commit

Permalink
Allow /56 subnet for ipv6 pool
Browse files Browse the repository at this point in the history
Needed for some crn
  • Loading branch information
olethanh committed Feb 21, 2025
1 parent 6055ad6 commit a242823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aleph/vm/network/hostnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class StaticIPv6Allocator(IPv6Allocator):
}

def __init__(self, ipv6_range: IPv6Network, subnet_prefix: int):
if ipv6_range.prefixlen != 64:
msg = "The static IP address allocation scheme requires a /64 subnet"
if ipv6_range.prefixlen not in (56, 64):
msg = "The static IP address allocation scheme requires a /64 or /56 subnet"

Check warning on line 57 in src/aleph/vm/network/hostnetwork.py

View check run for this annotation

Codecov / codecov/patch

src/aleph/vm/network/hostnetwork.py#L57

Added line #L57 was not covered by tests
raise ValueError(msg)
if subnet_prefix < 124:
msg = "The IPv6 subnet prefix cannot be larger than /124."
Expand Down

0 comments on commit a242823

Please sign in to comment.