Skip to content

Kea Reservation missing MAC address check #8683

Description

@PasDoe

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

Just addes a new reservation for my Windows PC. I've copied the MAC from a powershell windows which results in the MAC being split up with hypen (-) instead of colons (:). Copy pasting this into the kea reservation form did not result in any error but when opnsense restarted kea (itself?) the whole network was unreachable, even after reboot.

Tip: to validate your setup was working with the previous version, use opnsense-revert (https://docs.opnsense.org/manual/opnsense_tools.html#opnsense-revert)

To Reproduce

Steps to reproduce the behavior:

  1. Go to opnsense -> KEA DHCPv4 -> reservations
  2. Click on the + to add a new reservation or change an existing reservation
  3. Use any MAC with hyphens instead of colons
  4. Wait for opnsense to restart kea (or try restarting kea yourself)

Expected behavior

Not being able to add a MAC with an unsupported format

Describe alternatives you considered

Show an error when trying to add an unsuported MAC format
OR even better, automatically adjust the format (to colons).

Screenshots

If applicable, add screenshots to help explain your problem.

Relevant log files

2025-05-17T22:53:59	Error	kea-dhcp4	 ERROR [kea-dhcp4.dhcp4.0x2360b0812000] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/usr/local/etc/kea/kea-dhcp4.conf': invalid host identifier value 'D8-BB-C1-36-6B-B9' (/usr/local/etc/kea/kea-dhcp4.conf:187:21)
2025-05-17T22:53:59	Error	kea-dhcp4	 ERROR [kea-dhcp4.dhcp4.0x2360b0812000] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /usr/local/etc/kea/kea-dhcp4.conf, reason: invalid host identifier value 'D8-BB-C1-36-6B-B9' (/usr/local/etc/kea/kea-dhcp4.conf:187:21)
2025-05-17T22:53:59	Error	kea-dhcp4	 ERROR [kea-dhcp4.dhcp4.0x2360b0812000] DHCP4_PARSER_FAIL failed to create or run parser for configuration element subnet4: invalid host identifier value 'D8-BB-C1-36-6B-B9' (/usr/local/etc/kea/kea-dhcp4.conf:187:21)
2025-05-17T22:53:59	Informational	kea-dhcp4	 INFO  [kea-dhcp4.dhcpsrv.0x2360b0812000] DHCPSRV_CFGMGR_NEW_SUBNET4 a new subnet has been added to configuration: 172.28.9.0/24 with params: valid-lifetime=3600
2025-05-17T22:53:59	Warning	kea-dhcp4	 WARN  [kea-dhcp4.dhcp4.0x2360b0812000] DHCP4_RESERVATIONS_LOOKUP_FIRST_ENABLED Multi-threading is enabled and host reservations lookup is always performed first.
2025-05-17T22:53:59	Warning	kea-dhcp4	 WARN  [kea-dhcp4.dhcpsrv.0x2360b0812000] DHCPSRV_MT_DISABLED_QUEUE_CONTROL disabling dhcp queue control when multi-threading is enabled.
2025-05-17T22:53:59	Informational	kea-dhcp4	 INFO  [kea-dhcp4.hosts.0x2360b0812000] HOSTS_BACKENDS_REGISTERED the following host backend types are available:
None	None		2025-05-17 22:53:59.880 INFO  [kea-dhcp4.commands/37711.0x2360b0812000] COMMAND_RECEIVED Received command 'config-set'
None	None		2025-05-17 22:53:59.878 INFO  [kea-dhcp4.dhcp4/37711.0x2360b0812000] DHCP4_STARTING Kea DHCPv4 server version 2.6.2 (stable) starting

If applicable, information from log files supporting your claim.

Additional context

Add any other context about the problem here.

Environment

Software version used and hardware type if relevant, e.g.:

Versions
OPNsense 25.1.6_4-amd64
FreeBSD 14.2-RELEASE-p3
OpenSSL 3.0.16

Metadata

Metadata

Assignees

Labels

cleanupLow impact changes

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions