opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.36k stars 754 forks source link

Request MAC address validation when entering KEA reservation #7678

Open Bust3r14 opened 3 months ago

Bust3r14 commented 3 months ago

Readme Disclaimers

Problem

When entering a MAC address under /ui/kea/dhcp/v4#reservations, validation (if it exists) does not determine whether the entered MAC address is valid according to KEA code (e.g. whether entered address uses colons as pair separators).

Solution

In order to prevent KEA crashing without notice (excluding log files), I request MAC address validation similar to such that exists at /interfaces.php be added to /ui/kea/dhcp/v4#reservations.

Alternatives

Once the behavior is noticed, seeing KEA fail to restart is a likely indicator that a reservation's MAC address is invalid, which can be confirmed by checking KEA's logs. However, this can be tedious to check if one is entering multiple MAC addresses before attempting to restart KEA.

Other Considerations

If MAC address validation was not available elsewhere in the OPNsense GUI, I could see it not being worth the trouble to develop MAC address validation code for one page. Given that it exists elsewhere in the OPNsense GUI, I hope implementation is quick and easy. Addition of MAC address validation to the KEA reservation input screen also makes the OPNsense GUI more internally consistent.

Failed validation Log Explanation MAC Validation Warning

OPNsense-bot commented 3 months ago

Thank you for creating an issue. Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository, please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.