summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-01-15 14:49:43 -0500
committerStephen Beaver <sbeaver@netgate.com>2016-01-15 14:50:30 -0500
commit2bbab3a9349fd4d725106280751c0edf8a8baf03 (patch)
treeba996547278719d5a491e9c824c02be5b2212726 /src/usr/local/www/interfaces.php
parent38c6c8d48ce9a4af0738b9f4dcc049ac6ac87540 (diff)
downloadpfsense-2bbab3a9349fd4d725106280751c0edf8a8baf03.zip
pfsense-2bbab3a9349fd4d725106280751c0edf8a8baf03.tar.gz
Fixed #5771
EXCEPT that the link in the help text does not point to the correct place (yet)
Diffstat (limited to 'src/usr/local/www/interfaces.php')
-rw-r--r--src/usr/local/www/interfaces.php27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 0d82dd5..6615b7a 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -1755,13 +1755,26 @@ $group->setHelp('This field can be used to modify ("spoof") the MAC address of t
'Enter a MAC address in the following format: xx:xx:xx:xx:xx:xx or leave blank');
$section->add($group);
-$section->addInput(new Form_Input(
- 'mtu',
- 'MTU',
- 'number',
- $pconfig['mtu']
-))->setHelp('If you leave this field blank, the adapter\'s default MTU will be used. ' .
- 'This is typically 1500 bytes but can vary in some circumstances.');
+// If the interface is a VLAN and has a LAGG as a parent, the MTU cannot be set here.
+// We can determine that by parsing the interface name (begins with "lagg", contains "_vlan")
+if( (strrpos($wancfg['if'], "lagg", -strlen($wancfg['if'])) !== FALSE) && (strpos($wancfg['if'], "_vlan") !== false)) {
+ $section->addInput(new Form_Input(
+ 'mtu',
+ 'MTU',
+ 'number',
+ $pconfig['mtu']
+ ))->setHelp('<span class="text-danger">' . 'You may not set the MTU of a VLAN interface that has a LAGG parent here. ' . '<br />' .
+ '<a href="interfaces_lagg_edit.php?id=' . $wancfg['if'][4] . '">interfaces_lagg.php</a></span>')
+ ->setReadonly();
+} else {
+ $section->addInput(new Form_Input(
+ 'mtu',
+ 'MTU',
+ 'number',
+ $pconfig['mtu']
+ ))->setHelp('If you leave this field blank, the adapter\'s default MTU will be used. ' .
+ 'This is typically 1500 bytes but can vary in some circumstances.');
+}
$section->addInput(new Form_Input(
'mss',
OpenPOWER on IntegriCloud