Bug #7233
closedStatus DHCP Leases can have incorrect index for edit action
100%
Description
Forum: https://forum.pfsense.org/index.php?topic=125180.0
In the past, somehow (and I have seen it on systems of mine) it has been possible to end up with an empty row of data in the "DHCP Static Mappings for this Interface" in Services->DHCP. I am unable to replicate how this happens, I tried on VMs of systems back to 2.3-RELEASE with no "luck".
When this happens, Status->DHCP Leases correctly does not show the empty entry. But it does get the array index for subsequent entries wrong. So if you click the edit button to edit the entry for a row, it takes you to the wrong entry.
That can easily be fixed.
From Services->DHCP Server, such entries cannot be deleted. I think the underlying delete code only actually performs the delete if the entry is non-empty. I guess that should be fixed also.
Ideally it would be good to find how this can occur in the first place. Once understood, then that can be fixed (if still a bug in current code) and an upgrade step put in place to cleanup empty entries.
Updated by Phillip Davis almost 8 years ago
Pull Request https://github.com/pfsense/pfsense/pull/3505 to make sure the index counter in status_dhcp_leases keeps count correctly even if it skips over "blank" entries.
Updated by Phillip Davis almost 8 years ago
PR https://github.com/pfsense/pfsense/pull/3506 will let people delete an empty entry, if they get one somehow.
Updated by Phillip Davis almost 8 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 2ea70e1a474fd871a007c76841f2a33f34082c58.
Updated by Jim Pingle almost 8 years ago
- Target version changed from 2.4.0 to 2.3.3