Commit 576799a1 authored by Ad Schellevis's avatar Ad Schellevis

interfaces.php, vlan mtu, check with actual parent

parent 4ff07cad
......@@ -814,14 +814,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
if (stristr($a_interfaces[$if]['if'], "_vlan")) {
$realhwif_array = get_parent_interface($a_interfaces[$if]['if']);
// Need code to handle MLPPP if we ever use $realhwif for MLPPP handling
$parent_realhwif = $realhwif_array[0];
$parent_if = convert_real_interface_to_friendly_interface_name($parent_realhwif);
if (!empty($parent_if) && !empty($config['interfaces'][$parent_if]['mtu'])) {
if ($pconfig['mtu'] > intval($config['interfaces'][$parent_if]['mtu'])) {
$input_errors[] = gettext("MTU of a vlan should not be bigger than parent interface.");
}
$parentif = get_parent_interface($a_interfaces[$if]['if'])[0];
$intf_details = legacy_interfaces_details($parentif)[$parentif];
if ($intf_details['mtu'] < $pconfig['mtu']) {
$input_errors[] = gettext("MTU of a vlan should not be bigger than parent interface.");
}
} else {
foreach ($config['interfaces'] as $idx => $ifdata) {
......
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