4.3: Deleting a CIDR block doesn't delete IPs in the DB
Brought to you by:
trilexcom
Hi,
I have been working with thsi program today, I created
a 192.168.3.0/24 CIDR block, then decided I wanted to
play with a smaller one, say 192.168.3.64/26 block ..
So I deleted the /24 after I made the /26.
When I went to search I saw duplicate IPs listed where
the two blocks overlapped. Used mysql from the command
line and was able to verify that, yes, the CIDR
addresses from the deleted block still existed in the
database .. in fact, it did not appear the program was
deleting any IP addresses from the DB when the "CIDR
Remove" function is used from the user interface.
Logged In: YES
user_id=386949
Hi Max,
I appreciate your time finding this bug, and I have resolved
the issue, please download the latest CVS version of
cidr_remove.php or use the file attached. If there is
anything else you need please let me know.
Thanks,
mearls
Logged In: YES
user_id=458935
Originator: YES
Hi Mearls,
The patch didn't quite work, you had NetCidr instead of NetMenuId for the NetMenu removal, here is a patch (context diff) with that fixed and a tiny bit of code clean up on that little section :). I won't take offense if you don't include my reformatting :p, i know that is personal taste.
Patch to fix incorrect field for NetMenu deletion