Next available IP Address of a /31 prefix #2757
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Environment
Steps to Reproduce
When requesting next available IP from the API within a prefix that is a /31, an empty list is returned. This is causing issues further down the track with pynetbox not being able to create an IP address in a /31 prefix.
I have tracked this down to line 442 of ipam/models.py https://github.com/digitalocean/netbox/blob/f7f6704fc1956427608c86870f4bd609df0fb8ef/netbox/ipam/models.py#L442
According to RFC3021 first and last address in a /31 is a usable IP Address.
The following changes fix the problem. Should I create a PR for this?
From:
To:
The text was updated successfully, but these errors were encountered: