Bug 13689 - BOOTP breaks the list of DHCP leases due to erroneous parsing
Summary: BOOTP breaks the list of DHCP leases due to erroneous parsing
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: all All
: - Unknown - Aesthetic Issue
Assignee: Michael Tremer
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-14 22:55 UTC by Man Grove
Modified: 2024-06-13 17:08 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Man Grove 2024-05-14 22:55:56 UTC
When activating BOOTP and actually having such a device on the network the dynamic list disappears completely in the GUI when an IP is fetched. This is due to malfunctioning parsing, somewhere, of the /var/state/dhcp/dhcpd.leases file.

A BOOTP client will generate a section like this (BOOTP has no end time):

lease 192.168.0.1 {
  starts 2 2024/05/14 22:32:51;
  ends never;
  cltt 2 2024/05/14 22:32:51;
  binding state active;
  next binding state free;
  rewind binding state free;
  dynamic-bootp;
  hardware ethernet de:ad:be:ef:ac:dc;
}

The line "ends never;" breaks the parsing of the list. Changing that line manually to, for example, "ends 3 2024/06/15 02:14:02;" fixes it again.

Related forum threads:
https://community.ipfire.org/t/list-gets-borked-when-a-bootp-client-gets-its-ip/11607
https://community.ipfire.org/t/dhcp-dynamic-clients-not-showing-as-expected/8910

And, amusingly, https://redmine.pfsense.org/issues/3945?tab=history ;-)
Comment 1 Michael Tremer 2024-05-15 13:20:35 UTC
Could you please test and verify that this patch fixes the problem?

> https://patchwork.ipfire.org/project/ipfire/patch/20240515132003.1788345-1-michael.tremer@ipfire.org/
Comment 2 Man Grove 2024-05-15 20:31:29 UTC
(In reply to Michael Tremer from comment #1)
> Could you please test and verify that this patch fixes the problem? >
> https://patchwork.ipfire.org/project/ipfire/patch/20240515132003.1788345-1-
> michael.tremer@ipfire.org/

Tested and verified fixed. Great!
Comment 3 Michael Tremer 2024-05-16 09:57:08 UTC
Thank you!
Comment 4 Adolf Belka 2024-06-10 09:00:43 UTC
Patch has been merged into Cu186 Testing (master)

https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=6515a2780201e9209e370cd4562bef5cb771f1a5
Comment 5 Adolf Belka 2024-06-13 17:08:51 UTC
Core Update 186 has been released

https://www.ipfire.org/blog/ipfire-2-29-core-update-186-released