mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
interfaces: adjust this for moving it to stable safely
While this should work let's try not to assume how the interface names look like and just match until the next known delimiter by excluding it and accepting all other characters.
This commit is contained in:
parent
a0f2e8fac8
commit
6607268a23
@ -223,7 +223,7 @@ function legacy_interface_stats($ifs = null)
|
||||
|
||||
$current_interface = '';
|
||||
foreach ($out as $line) {
|
||||
if (preg_match('/^Interface ([a-z0-9-_.:]+) \(([a-z]+[0-9]+)\):$/i', $line, $names)) {
|
||||
if (preg_match('/^Interface ([^\s]+) \(([^\)]+)\):$/i', $line, $names)) {
|
||||
$stats[$names[1]] = [
|
||||
'device' => $names[1],
|
||||
'driver' => $names[2],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user