diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-03-04 09:50:48 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-03-04 09:50:48 -0300 |
commit | 4a7352101fbd6901b46a3b6a9a3c00d23b75f0e1 (patch) | |
tree | 674a471c661c34b46fb49629fac68946b2d5dbb0 /usr | |
parent | 74889b22327fedff1a1a1d994f8dc67860098763 (diff) | |
download | pfsense-4a7352101fbd6901b46a3b6a9a3c00d23b75f0e1.zip pfsense-4a7352101fbd6901b46a3b6a9a3c00d23b75f0e1.tar.gz |
Make parent interface and all VLANs use the same MTU. Fixes #2786
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/interfaces.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 5279a98..2f6fd48 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -92,6 +92,14 @@ if ($if == "wan" && !$wancfg['descr']) else if ($if == "lan" && !$wancfg['descr']) $wancfg['descr'] = "LAN"; +$parent_vlan_if = ""; +if (preg_match('/_vlan[0-9]/', $wancfg['if'])) { + $realhwif_array = get_parent_interface($wancfg['if']); + // Need code to handle MLPPP if we ever use $realhwif for MLPPP handling + $realhwif = $realhwif_array[0]; + $parent_vlan_if = convert_real_interface_to_friendly_interface_name($realhwif); + $wancfg['mtu'] = ''; +} foreach ($a_ppps as $pppid => $ppp) { if ($wancfg['if'] == $ppp['if']) @@ -1414,10 +1422,18 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"), <tr> <td valign="top" class="vncell"><?=gettext("MTU"); ?></td> <td class="vtable"> - <input name="mtu" type="text" class="formfld unknown" id="mtu" size="8" value="<?=htmlspecialchars($pconfig['mtu']);?>"> + <input name="mtu" type="text" class="formfld unknown" id="mtu" size="8" value="<?=htmlspecialchars($pconfig['mtu']);?>" + <?php if(!empty($parent_vlan_if)) print "disabled"; ?>> <br> - <?=gettext("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."); ?> + <?php + if (empty($parent_vlan_if)) + print gettext("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."); + else + print gettext("This interface is a VLAN and it needs to use same MTU set for " . + "its parent. You can change parent's MTU") . "<a href=\"interfaces.php?if={$parent_vlan_if}\"> " . + gettext("here") . ".</a>"; + ?> </td> </tr> <tr> |