Fixes #21050: Prevent reassignment of OOB IPs #597

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

Originally created by @pheus on 1/13/2026

Fixes: #21050

Prevents creating stale device OOB IP references when reassigning IPs.

  • Disable reassignment in the UI when an IP is designated as a primary IP or device OOB IP.
  • Add model-level validation to block reassignment while an IP is set as a device’s OOB IP (covers API updates as well).

Note: No migration is included to clean up existing orphaned OOB IP references. The required logic is fairly complex (generic assignments / dependencies) and this is expected to be an edge case; remediation can be done via a one-off nbshell script as discussed in the issue.

Thanks for the review!

*Originally created by @pheus on 1/13/2026* ### Fixes: #21050 Prevents creating stale device OOB IP references when reassigning IPs. - Disable reassignment in the UI when an IP is designated as a primary IP or device OOB IP. - Add model-level validation to block reassignment while an IP is set as a device’s OOB IP (covers API updates as well). Note: No migration is included to clean up existing orphaned OOB IP references. The required logic is fairly complex (generic assignments / dependencies) and this is expected to be an edge case; remediation can be done via a one-off `nbshell` script as discussed in the issue. Thanks for the review!
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#597