mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
legacy_interfaces_details() parse issue on fetching laggports, needed for https://github.com/opnsense/core/issues/1709
This commit is contained in:
parent
093895e37e
commit
cebc6c7e11
@ -211,7 +211,7 @@ function legacy_interfaces_details($intf = null)
|
||||
$current_interface = null;
|
||||
foreach ($ifconfig_data as $line) {
|
||||
$line_parts = explode(' ', $line);
|
||||
if (strpos(trim($line), 'flags=') !== false) {
|
||||
if (strpos(trim($line), 'flags=') !== false && $line[0] != "\t") {
|
||||
$current_interface = explode(':', $line)[0];
|
||||
$result[$current_interface] = array();
|
||||
$result[$current_interface]["capabilities"] = array();
|
||||
@ -284,7 +284,7 @@ function legacy_interfaces_details($intf = null)
|
||||
if (empty($result[$current_interface]['laggport'])) {
|
||||
$result[$current_interface]['laggport'] = array();
|
||||
}
|
||||
$result[$current_interface]['laggport'][] = $matches[1];
|
||||
$result[$current_interface]['laggport'][] = explode(' ', trim($matches[1]))[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user