Commit 4785db53 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

legacy_interface_stats using the wrong interface name. reference...

legacy_interface_stats using the wrong interface name. reference https://github.com/opnsense/core/issues/1014

(cherry picked from commit 8405ee77)
parent 040f6c19
......@@ -169,7 +169,7 @@ function legacy_interface_stats($ifs=null)
$current_interface = "";
foreach ($out as $line) {
if (strpos($line, 'Interface') === 0) {
$current_interface = explode(')', explode('(', $line)[1])[0];
$current_interface = explode('(', explode(' ', $line)[1])[0];
$stats[$current_interface] = array();
} elseif ($current_interface != "") {
$stat = explode(':', $line);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment