Project

General

Profile

Actions

Bug #7233

closed

Status DHCP Leases can have incorrect index for edit action

Added by Phillip Davis almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
DHCP (IPv4)
Target version:
Start date:
02/07/2017
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:

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.

Actions #1

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.

Actions #2

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.

Actions #3

Updated by Phillip Davis almost 8 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #4

Updated by Jim Pingle almost 8 years ago

  • Target version changed from 2.4.0 to 2.3.3
Actions #5

Updated by Renato Botelho almost 8 years ago

  • Status changed from Feedback to Resolved

works

Actions

Also available in: Atom PDF