diff options
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-x | usr/local/www/interfaces.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 4b74997..922caa8 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -642,17 +642,17 @@ if ($_POST['apply']) { $input_errors[] = gettext("A valid MAC address must be specified."); if ($_POST['mtu']) { if ($_POST['mtu'] < 576 || $_POST['mtu'] > 9000) - $input_errors[] = gettext("The MTU must be greater than 576 bytes."); + $input_errors[] = gettext("The MTU must be greater than 576 bytes and less than 9000."); if (stristr($wancfg['if'], "_vlan")) { $realhwif_array = get_parent_interface($wancfg['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) && isset($config['interfaces'][$parent_if]['mtu'])) { + if (!empty($parent_if) && !empty($config['interfaces'][$parent_if]['mtu'])) { $parent_mtu = $config['interfaces'][$parent_if]['mtu']; - if ($_POST['mtu'] > $parent_mtu) + if ($_POST['mtu'] > intval($config['interfaces'][$parent_if]['mtu'])) $input_errors[] = gettext("MTU of a vlan should not be bigger than parent interface."); } } else { |