Searching for IPv6 addresses in the global search should search for the compressed format #10843

Closed
opened 2025-12-29 21:36:38 +01:00 by adam · 2 comments
Owner

Originally created by @kasimon on GitHub (Mar 5, 2025).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v4.2.4

Feature type

Change to existing functionality

Proposed functionality

Currently, when searching for ipv6 addresses in the global search, the user may only use the compressed ipv6 form (no leading zeros, multiple :0: blocks replaced by ::). My suggestion is that if the search term correctly parses as an ipv6 address, it should be internally normalized to the compressed form before sending it off to the search engine. Btw a similar correction already is in place with capital letters in ipv6 addresses, which are transparently converted to lower case letters.

Use case

When copying+pasting addresses or constructing search urls from other systems these systems may not always work with the compressed form, which causes the user to have to manually change the search term or being in the wrong impression that this ip address is not present in netbox, causing confusion or errors.

Database changes

None

External dependencies

None

Originally created by @kasimon on GitHub (Mar 5, 2025). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v4.2.4 ### Feature type Change to existing functionality ### Proposed functionality Currently, when searching for ipv6 addresses in the global search, the user may only use the compressed ipv6 form (no leading zeros, multiple `:0:` blocks replaced by `::`). My suggestion is that if the search term correctly parses as an ipv6 address, it should be internally normalized to the compressed form before sending it off to the search engine. Btw a similar correction already is in place with capital letters in ipv6 addresses, which are transparently converted to lower case letters. ### Use case When copying+pasting addresses or constructing search urls from other systems these systems may not always work with the compressed form, which causes the user to have to manually change the search term or being in the wrong impression that this ip address is not present in netbox, causing confusion or errors. ### Database changes None ### External dependencies None
adam added the status: acceptedtype: featurecomplexity: low labels 2025-12-29 21:36:38 +01:00
adam closed this issue 2025-12-29 21:36:38 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 13, 2025):

We could introduce an attribute on the IPAddress model which returns the expanded form of an IPv6 address and include this as a cached value in the search indexer.

@jeremystretch commented on GitHub (Mar 13, 2025): We could introduce an attribute on the IPAddress model which returns the expanded form of an IPv6 address and include this as a cached value in the search indexer.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 12, 2025):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Jun 12, 2025): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10843