Skip to content

Conversation

@kkthxbye-code
Copy link
Contributor

Fixes: #11601

Allows partial lookup in the search method for IPRange. Also removes the .cidr from the parsed IP lookup as I really don't see how it makes sense.

The changes makes it so that the following matches (192.168.0.1/25-192.168.0.25/25, which didn't before:
192
192.16
192.168.0.1/25 <- even the full IP with mask didn't match before because of using the cidr.
192.168.0.25/25

@jeremystretch
Copy link
Member

Also removes the .cidr from the parsed IP lookup as I really don't see how it makes sense.

My guess is it was mistakenly copied over from PrefixFilterSet back when IP ranges were introduced. (It's used there to match based on a contained IP address.)

@jeremystretch jeremystretch merged commit f923728 into netbox-community:develop Feb 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IP Range search not working as expected

2 participants