summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-12-27 20:49:29 +0000
committerErmal <eri@pfsense.org>2013-12-27 20:49:29 +0000
commitf6d89471d3c526be7ff07b2b6307d4d2ebc6a2d7 (patch)
tree94895934b8a0cb88e6e3cef571ff5db2fed8dd34 /usr
parentaaa78416a7d817816aa30759898e10b0b510919c (diff)
downloadpfsense-f6d89471d3c526be7ff07b2b6307d4d2ebc6a2d7.zip
pfsense-f6d89471d3c526be7ff07b2b6307d4d2ebc6a2d7.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. Manual merge of 53555bf2f796cd53cf649410fe1827a9a45fc4a7
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 75fd460..d19d2ac 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -696,17 +696,15 @@ 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'])) {
- $parent_mtu = $config['interfaces'][$parent_if]['mtu'];
-
- if ($_POST['mtu'] > $parent_mtu)
+ if (!empty($parent_if) && !empty($config['interfaces'][$parent_if]['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 {
OpenPOWER on IntegriCloud