Skip to content

Commit 4ba91d8

Browse files
fix(DHCPServer): improve init interface qualifiers #781
Instead of expecting interface types, just check if the interface has a IPv4 literal assigned.
1 parent a625e94 commit 4ba91d8

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'] !== 'static' or $if->subnet->value >= 31) {
264+
if (empty($if['ipaddr']) or !is_ipaddrv4($if['ipaddr']) or $if->subnet->value >= 31) {
265265
continue;
266266
}
267267

0 commit comments

Comments
 (0)