Project

General

Profile

Feature #34280

Add `ip_include?` method to IPAM::Base that uses `IPAddr#include?` method

Added by Jan Matusz 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Network
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Related to: https://github.com/theforeman/foreman_discovery/pull/545

We need to be able to validate whether user sourced IP set in the form is included in the available subnet.
Initially we just ran `.include?` on a Range object generated through `subnet_range` method, however, this is extremely inefficient when used on huge subnets (specifically in this case, an IPv6 range inclusion check timed out).

This brought `IPAddr#include` to the spotlight.

Associated revisions

Revision 337ac271 (diff)
Added by Jan Matusz 4 months ago

Fixes #34280 - Add `ip_include?` method to `IPAM::Base`

History

#1 Updated by The Foreman Bot 4 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9036 added

#2 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 3.2.0 added

#3 Updated by Jan Matusz 4 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Amit Upadhye 3 months ago

  • Category set to Network

Also available in: Atom PDF