opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
136 stars 35 forks source link

Host delete with NAT IP addresses #94

Open mattpascoe opened 8 years ago

mattpascoe commented 8 years ago

Currently when you delete a host that has NAT IPs you will get a failure. The problem is that a list of all interfaces are gathered for the delete. It then starts deleting the interfaces and if it first deletes the internal interface, that delete logic will delete the NAT IP as well. Then as it continues deleting interfaces it tries to delete the NAT IP that was previously deleted.

The fix should be to exclude NAT IPs from the list of interfaces to delete in the host_del module. This would be an adjustment to the query on or around line 658 of the host.inc.php module