Skip to content

Behavior for getting available ips in v6 prefixes differ between api and frontend #6350

@jweiher

Description

@jweiher

NetBox version

v.2.11.1

Python version

3.9

Steps to Reproduce

  1. Create a v6 prefix
  2. Open ip addresses tab
  3. See that the frontend suggests (correctly) that :: (e.g. the 0-th ip in the net) is available, which is correct for v6
  4. Use /ipam/prefixes/{id}/available-ips/ via API for the same prefix - the first ip shown is ::1

Expected Behavior

The expected behavior would be that at least the api and the frontend behave the same.

Observed Behavior

API and Frontend behave different. The problem is probably due to different "get available ip" algorithms being implemented. The frontend view uses code from ipam/utils.py and the api uses the code from the prefix model. In my opinion there should only be one place in the codebase where this is implemented.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions