Fixes #21347: Fix IPv6 first available IP allocation for non-pool prefixes #258

Closed
opened 2026-04-05 16:23:50 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 3/2/2026

Fixes: #21347

This PR corrects available IP selection for IPv6 non-pool prefixes by excluding the subnet-router anycast address (RFC 4291). As a result, the “First available” allocation for a typical IPv6 prefix (e.g. /64) starts at ::1 instead of ::.

It also adds test coverage for IPv4/IPv6 pool behavior and the fully-usable edge cases (/31-/32 for IPv4 and /127-/128 for IPv6) to help prevent regressions.

*Originally created by @pheus on 3/2/2026* ### Fixes: #21347 This PR corrects available IP selection for IPv6 non-pool prefixes by excluding the subnet-router anycast address (RFC 4291). As a result, the “First available” allocation for a typical IPv6 prefix (e.g. `/64`) starts at `::1` instead of `::`. It also adds test coverage for IPv4/IPv6 pool behavior and the fully-usable edge cases (`/31`-`/32` for IPv4 and `/127`-`/128` for IPv6) to help prevent regressions.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#258