Change in Search Functionality since v.3.4.0 returning incorrect CIDR matches #7520

Closed
opened 2025-12-29 20:24:39 +01:00 by adam · 1 comment
Owner

Originally created by @Dirimsa on GitHub (Jan 16, 2023).

NetBox version

v3.4.2

Python version

3.8

Steps to Reproduce

Since Implementing the new search functionality in NetBox 3.4.0 the search engine does not match CIDR ranges any more and it seems more like a string match which in the end returns incorrect CIDR match resultsets.

Example:

I have the following CIDR Ranges:
10.160.0.0/16
-> 10.160.0.0/20 - 10.160.0.0 - 10.160.15.255

I want to lookup the IP Adress in the search engine: 10.160.4.76 which is part of the CIDR Range.

Prior to Version 3.4.0:

  • Resultset of the search contained the CIDR Range 10.160.0.0/20 + 10.160.0.0/16

Starting with Version 3.4.0:

  • Resultset does no longer contain the CIDR Range 10.160.0.0/20 + 10.160.0.0/16
  • Resultset is empty because I do not have any CIDR Ranges starting with 10.160.4.76
    • I tried all the different search engine filters, startswith, endswith, regex, partial match, full match,
    • The following resultsets are returned:
      • startswith: empty resultset
      • endswith: empty resultset
      • regex: empty resultset
      • partial match: empty resultset
      • full match: empty resultset

Expected Behavior

Return the CIDR Ranges to which the searched IP address belongs

I would expect the resultset to contain both CIDR ranges: 10.160.0.0/16 + 10.160.0.0/20

Observed Behavior

Resultset is empty

Originally created by @Dirimsa on GitHub (Jan 16, 2023). ### NetBox version v3.4.2 ### Python version 3.8 ### Steps to Reproduce Since Implementing the new search functionality in NetBox 3.4.0 the search engine does not match CIDR ranges any more and it seems more like a string match which in the end returns incorrect CIDR match resultsets. #### Example: I have the following CIDR Ranges: 10.160.0.0/16 -> 10.160.0.0/20 - 10.160.0.0 - 10.160.15.255 I want to lookup the IP Adress in the search engine: 10.160.4.76 which is part of the CIDR Range. Prior to Version 3.4.0: - Resultset of the search contained the CIDR Range 10.160.0.0/20 + 10.160.0.0/16 Starting with Version 3.4.0: - Resultset does no longer contain the CIDR Range 10.160.0.0/20 + 10.160.0.0/16 - Resultset is empty because I do not have any CIDR Ranges starting with 10.160.4.76 - I tried all the different search engine filters, startswith, endswith, regex, partial match, full match, - The following resultsets are returned: - startswith: empty resultset - endswith: empty resultset - regex: empty resultset - partial match: empty resultset - full match: empty resultset ### Expected Behavior Return the CIDR Ranges to which the searched IP address belongs I would expect the resultset to contain both CIDR ranges: 10.160.0.0/16 + 10.160.0.0/20 ### Observed Behavior Resultset is empty
adam added the type: bug label 2025-12-29 20:24:39 +01:00
adam closed this issue 2025-12-29 20:24:39 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 16, 2023):

Thank you for submitting this issue, however it appears that this topic has already been raised. Please see issue #11315 for further discussion.

@jeremystretch commented on GitHub (Jan 16, 2023): Thank you for submitting this issue, however it appears that this topic has already been raised. Please see issue #11315 for further discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7520