Hi,
I'm trying the current version in dev 1.29 and I saw this in Import IP addresses: "Providing a subnet is optional, the system will add the IP to the longest match if no subnet is provided."
It looks like it's not yet implemented (not working and no trace in code) and I'd like to help adding this feature in phpipam.
Subnet created:
Section1
|-> 192.168.0.0/16 Root1
|-> 192.168.1.0/24 subTarget1
Section2
|-> 192.168.0.0/16 Root2
|-> 192.168.1.0/28 subTarget2
IP to import:
192.168.1.1
This feature should, with the current import template, return subTarget1 and subTarget2.
So I guess it's beter to add Section in import template so with a function like getLongestSubnet(Section, IP) it can returns the wanted subnet.
I'm trying to do that in the API but i'm missing knowledge of the whole code to do so.
I first try to extend /api/my_app/addresses/search/{ip}/ to return longest subnet.
Is there any internal function that would do that already ?
Great job BTW !!
Anonymous