diff options
author | Ermal <eri@pfsense.org> | 2013-12-27 20:05:08 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-12-27 20:37:34 +0000 |
commit | 53555bf2f796cd53cf649410fe1827a9a45fc4a7 (patch) | |
tree | 1c2085db98a127c04f1d33abf7d53df4530c0440 /usr/local/www | |
parent | 1a4ef44e5c86e1dd480b8abe40b9483bbdb3e8d3 (diff) | |
download | pfsense-53555bf2f796cd53cf649410fe1827a9a45fc4a7.zip pfsense-53555bf2f796cd53cf649410fe1827a9a45fc4a7.tar.gz |
Make sense of interface mtu handling code. No need to do unneeded operations. This fixes slow boot times and proper handling of mtu for vlans though some work or better model is needed for other interface types.
Diffstat (limited to 'usr/local/www')
-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 { |