Commit e5e914c9 authored by Ad Schellevis's avatar Ad Schellevis

add mtu to legacy_interfaces_details()

parent cebc6c7e
...@@ -219,6 +219,9 @@ function legacy_interfaces_details($intf = null) ...@@ -219,6 +219,9 @@ function legacy_interfaces_details($intf = null)
$result[$current_interface]["macaddr"] = "00:00:00:00:00:00"; $result[$current_interface]["macaddr"] = "00:00:00:00:00:00";
$result[$current_interface]["ipv4"] = array(); $result[$current_interface]["ipv4"] = array();
$result[$current_interface]["ipv6"] = array(); $result[$current_interface]["ipv6"] = array();
if (preg_match("/ mtu ([0-9]*).*$/", $line, $matches)) {
$result[$current_interface]["mtu"] = $matches[1];
}
} elseif (empty($current_interface)) { } elseif (empty($current_interface)) {
// skip parsing, no interface found (yet) // skip parsing, no interface found (yet)
continue; continue;
......
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