firewall: two more group issues

This commit is contained in:
Franco Fichtner 2023-08-01 12:24:55 +02:00
parent e27d37a23c
commit 0e1aa4bcca
2 changed files with 2 additions and 2 deletions

View File

@ -736,7 +736,7 @@ $( document ).ready(function() {
<?php
$ifgroups = [];
foreach (config_read_array('ifgroups', 'ifgroupentry') as $ifgroup) {
if (!empty($ifgroup['members']) && in_array($selected_if, explode(' ', $ifgroup['members']))) {
if (!empty($ifgroup['members']) && in_array($selected_if, preg_split('/[ |,]+/', $ifgroup['members']))) {
$ifgroups[] = $ifgroup['ifname'];
}
}

View File

@ -42,7 +42,7 @@ function link_interface_to_group($int)
if (isset($config['ifgroups']['ifgroupentry'])) {
foreach ($config['ifgroups']['ifgroupentry'] as $group) {
if (in_array($int, explode(" ", $group['members']))) {
if (in_array($int, preg_split('/[ |,]+/', $group['members']))) {
$result[$group['ifname']] = $int;
}
}