Commit cf732b0e authored by Ad Schellevis's avatar Ad Schellevis

(legacy) zap get_interface_mtu

parent 0be62650
......@@ -723,8 +723,8 @@ function interface_bridge_add_member($bridgeif, $interface)
return;
}
$mtu = get_interface_mtu($bridgeif);
$mtum = get_interface_mtu($interface);
$mtu = legacy_interface_stats($bridgeif)['mtu'];
$mtum = legacy_interface_stats($interface)['mtu'];
if ($mtu != $mtum && !(substr($interface, 0, 3) == "gif" && $mtu <= 1500)) {
legacy_interface_mtu($interface, $mtu);
......@@ -2908,11 +2908,11 @@ function interface_vlan_adapt_mtu($vlanifs, $mtu)
legacy_interface_mtu($vlan['vlanif'], $mtu);
}
} else {
if (get_interface_mtu($vlan['vlanif']) != $mtu) {
if (legacy_interface_stats($vlan['vlanif'])['mtu'] != $mtu) {
legacy_interface_mtu($vlan['vlanif'], $mtu);
}
}
} elseif (get_interface_mtu($vlan['vlanif']) != $mtu) {
} elseif (legacy_interface_stats($vlan['vlanif'])['mtu'] != $mtu) {
legacy_interface_mtu($vlan['vlanif'], $mtu);
}
}
......@@ -3095,7 +3095,7 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
}
if ($wancfg['mtu'] > $parentmtu) {
if (get_interface_mtu($realhwif) != $wancfg['mtu']) {
if (legacy_interface_stats($realhwif)['mtu'] != $wancfg['mtu']) {
legacy_interface_mtu($realhwif, $wancfg['mtu']);
}
......@@ -3105,7 +3105,7 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
legacy_interface_mtu($realif, $wancfg['mtu']);
}
} else {
if ($wancfg['mtu'] != get_interface_mtu($realif)) {
if ($wancfg['mtu'] != legacy_interface_stats($realif)['mtu']) {
legacy_interface_mtu($realif, $wancfg['mtu']);
}
......@@ -4977,19 +4977,6 @@ function is_interface_wireless($interface)
}
/****f* interfaces/get_interface_mtu
* NAME
* get_interface_mtu - Return the mtu of an interface
* RESULT
* $tmp - Returns the mtu of an interface
******/
function get_interface_mtu($interface)
{
$mtu = pfSense_get_interface_addresses($interface);
return $mtu['mtu'];
}
function get_interface_mac($interface)
{
$macinfo = pfSense_get_interface_addresses($interface);
......
......@@ -160,7 +160,7 @@ function services_radvd_configure($blacklist = array())
$radvdconf .= "\tAdvSendAdvert on;\n";
$radvdconf .= "\tMinRtrAdvInterval 5;\n";
$radvdconf .= "\tMaxRtrAdvInterval 20;\n";
$mtu = get_interface_mtu($realif);
$mtu = legacy_interface_stats($realif)['mtu'];
if (is_numeric($mtu))
$radvdconf .= "\tAdvLinkMTU {$mtu};\n";
else
......@@ -292,7 +292,7 @@ function services_radvd_configure($blacklist = array())
$radvdconf .= "\tAdvSendAdvert on;\n";
$radvdconf .= "\tMinRtrAdvInterval 3;\n";
$radvdconf .= "\tMaxRtrAdvInterval 10;\n";
$mtu = get_interface_mtu($realif);
$mtu = legacy_interface_stats($realif)['mtu'];
if (is_numeric($mtu))
$radvdconf .= "\tAdvLinkMTU {$mtu};\n";
else
......
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