Skip to content

Commit d9f7fbf

Browse files
fix(DHCPServer): don't initialize dhcp server on non-static interfaces #781
The current setup only marked dhcp interfaces as exempt from dhcp server initialization. We need to broaden this exemption condition to exclude any non-static interface.
1 parent c1bb0ac commit d9f7fbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/DHCPServer.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class DHCPServer extends Model {
261261
# Loop through each defined interface
262262
foreach ($this->get_config('interfaces', []) as $if_id => $if) {
263263
# Skip this interface if it is not a static interface or the subnet value is greater than or equal to 31
264-
if (empty($if['ipaddr']) or $if['ipaddr'] === 'dhcp' or $if->subnet->value >= 31) {
264+
if (empty($if['ipaddr']) or $if['ipaddr'] !== 'static' or $if->subnet->value >= 31) {
265265
continue;
266266
}
267267

0 commit comments

Comments
 (0)