isc-dhcp: check if device we try to configure exists in the system

PR: https://github.com/opnsense/plugins/issues/5169
This commit is contained in:
Franco Fichtner 2026-01-26 11:05:35 +01:00
parent 7c4f3c7e4a
commit 4020561368
3 changed files with 6 additions and 1 deletions

View file

@ -1,6 +1,6 @@
PLUGIN_NAME= isc-dhcp
PLUGIN_VERSION= 1.0
PLUGIN_REVISION= 2
PLUGIN_REVISION= 3
PLUGIN_COMMENT= ISC DHCPv4/v6 server
PLUGIN_DEPENDS= isc-dhcp44-server
PLUGIN_MAINTAINER= franco@opnsense.org

View file

@ -14,4 +14,5 @@ Plugin Changelog
* First release resembling the core state of 25.7.11
* Minor changes due to "radvd" extraction out of DHCPv6 configuration
* Minor changes regarding "track6" and "idassoc6" mode handling
* Safeguard dhcpd_staticarp() from nonexistent interface configuration
* Added DHCPv6 static mappings export

View file

@ -1310,6 +1310,10 @@ function dhcpd_staticarp($interface, $ifconfig_details)
$device = $ifcfg['if'];
if (empty($ifconfig_details[$device])) {
return;
}
$have = in_array('staticarp', $ifconfig_details[$device]['flags']);
$want = isset($config['dhcpd'][$interface]['staticarp']);