Project

General

Profile

Actions

Bug #16719

closed
JS MM

DHCP clients may not receive the reserved address after changing the DHCP static mapping

Bug #16719: DHCP clients may not receive the reserved address after changing the DHCP static mapping

Added by Jamie S 7 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DHCP (IPv4)
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
26.07
Release Notes:
Force Exclusion
Affected Version:
2.8.1
Affected Architecture:
All

Description

Editing a Kea static lease to change the MAC address does not clear the old entry from /var/lib/kea/dhcp4.leases, so when the new device is connected a new IPv4 address is assigned to the device, instead of the one configured in the static lease. The Kea log also shows e.g.:

WARN [kea-dhcp4.alloc-engine.0x218397417400] ALLOC_ENGINE_V4_DISCOVER_ADDRESS_CONFLICT [hwtype=1 30:13:8b:79:56:af], cid=[01:30:13:8b:79:56:46], tid=0x65b2ee64: conflicting reservation for address 10.6.0.4 with existing lease Address: 10.6.0.4 Valid life: 7200 Cltt: 1752320340 Hardware addr: e0:73:e7:c6:6a:24 Client id: 01:e0:73:e7:c6:6a:31 Subnet ID: 1 Pool ID: 0 State: default Relay ID: (none) Remote ID: (none)

The old lease entry is not being removed from dhcp4.leases when the static lease edit form is saved with a new MAC.

Discussion thread on the forum: https://forum.netgate.com/topic/198115/changing-the-mac-address-on-a-kea-static-lease-does-not-work


Related issues 1 (0 open1 closed)

Related to Bug #15956: Kea DHCP static mappings requires lease expiry before taking effectRejected

Actions

JS Updated by Jamie S 7 months ago Actions #1

Typo in the title, should be: Changing the MAC address on a Kea static lease does not clear dhcp4.leases

→L Updated by → luckman212 7 months ago Actions #2

Just want to also note that rebooting pfSense does not clear this condition, the only way to fix it currently is to hand edit that dhcp4.leases file

MM Updated by Marcos M 6 months ago Actions #3

  • Status changed from New to Pull Request Review
  • Assignee set to Marcos M

Kea itself handles the memfile but we can try making sure the old lease - if one exists - has been cleared so that the reserved address is available for the new lease.
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/1272

MM Updated by Marcos M 6 months ago Actions #4

  • Status changed from Pull Request Review to Feedback
  • Target version set to 2.9.0
  • % Done changed from 0 to 100
  • Plus Target Version set to 26.07

JP Updated by Jim Pingle 6 months ago Actions #5

  • Subject changed from Changing the MAC address on a Kea static lease does clear dhcp4.leases to Changing the MAC address on a Kea static lease not does remove the old lease database entry

MM Updated by Marcos M 5 months ago Actions #6

  • Subject changed from Changing the MAC address on a Kea static lease not does remove the old lease database entry to DHCP clients may not receive the reserved address after changing the DHCP static mapping
  • Status changed from Feedback to Ready To Test

Updating issue title to reflect the problem reported on the forum.

AZ Updated by Alhusein Zawi 5 months ago Actions #7

  • Status changed from Ready To Test to Feedback

I changed the MAC address on a Kea static lease, and I do not see that warning in the logs. The DHCP client is able to receive the new IP.

26.07-DEVELOPMENT (amd64)
built on Sat Apr 25 6:00:00 UTC 2026
FreeBSD 16.0-CURRENT

Edit: Same results on 25.11.1.

MM Updated by Marcos M 4 months ago Actions #8

  • Release Notes changed from Default to Force Exclusion

MM Updated by Marcos M 4 months ago Actions #9

  • Status changed from Feedback to Closed

→L Updated by → luckman212 4 months ago Actions #10

Just checking - marcos' patch is still needed on 26.03.1 correct?

MM Updated by Marcos M 4 months ago Actions #11

The patch will be in 26.07. However it's mostly supplemental given that the original issue was not reproducible in >=25.11.1.

MM Updated by Marcos M 3 months ago Actions #12

  • Related to Bug #15956: Kea DHCP static mappings requires lease expiry before taking effect added
Actions

Also available in: Atom