mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
Firewall / live log: omit group type interfaces in fast selection. closes https://github.com/opnsense/core/issues/4369
This commit is contained in:
parent
0074b94fae
commit
59c1a95bfa
@ -68,9 +68,16 @@ class FirewallController extends ApiControllerBase
|
||||
$interfaces = [];
|
||||
if ($config->interfaces->count() > 0) {
|
||||
foreach ($config->interfaces->children() as $key => $node) {
|
||||
// XXX: Omit group types since they don't link to actual interfaces.
|
||||
if (isset($node->type) && (string)$node->type == 'group') {
|
||||
continue;
|
||||
} elseif ((string)$node->if == 'openvpn') {
|
||||
continue;
|
||||
}
|
||||
$interfaces[] = !empty((string)$node->descr) ? (string)$node->descr : $key;
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
"interface_name" => $interfaces,
|
||||
"dir" => ["in", "out"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user