summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-11-26 20:42:17 +0100
committerErmal LUÇI <eri@pfsense.org>2014-11-26 20:42:17 +0100
commit31ddb93598f2fd672de383d224e7388880fe5311 (patch)
treec7f10af63ecbf30810dd92ba0fbbc6d05606db2d /etc/inc/interfaces.inc
parentac9f16ad4945141e8811e39152c2fc2d2f9dbc97 (diff)
downloadpfsense-31ddb93598f2fd672de383d224e7388880fe5311.zip
pfsense-31ddb93598f2fd672de383d224e7388880fe5311.tar.gz
Partially revert the previous modification on vlan mtu. The function job is to find the biggest mtu between vlans and let it do that
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc16
1 files changed, 5 insertions, 11 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 28ab2c2..cabf8a2 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2760,16 +2760,13 @@ function find_dhcp6c_process($interface) {
return intval($pid);
}
-function interface_vlan_mtu_configured($realhwif, $mtu, $vlanskip = '') {
+function interface_vlan_mtu_configured($realhwif, $mtu) {
global $config;
if (is_array($config['vlans']) && is_array($config['vlans']['vlan'])) {
foreach ($config['vlans']['vlan'] as $vlan) {
if ($vlan['if'] != $realhwif)
continue;
- /* Skip the vlans needed to be skiped. */
- if (!empty($vlanskip) && $vlanskip == $vlan['vlanif'])
- continue;
$assignedport = convert_real_interface_to_friendly_interface_name($vlan['vlanif']);
if (!empty($assignedport) && !empty($config['interfaces'][$assignedport]['mtu'])) {
if (intval($config['interfaces'][$assignedport]['mtu']) > $mtu)
@@ -3006,14 +3003,11 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
$parentmtu = interface_vlan_mtu_configured($realhwif, $parentmtu, $realif);
}
- if ($wancfg['mtu'] > $parentmtu) {
- if (get_interface_mtu($realhwif) != $wancfg['mtu'])
- pfSense_interface_mtu($realhwif, $wancfg['mtu']);
+ if (get_interface_mtu($realhwif) != $wancfg['mtu'])
+ pfSense_interface_mtu($realhwif, $wancfg['mtu']);
- /* All vlans need to use the same mtu value as their parent. */
- interface_vlan_adapt_mtu(link_interface_to_vlans($realhwif), $wancfg['mtu']);
- } else
- pfSense_interface_mtu($realif, $wancfg['mtu']);
+ /* All vlans need to use the same mtu value as their parent. */
+ interface_vlan_adapt_mtu(link_interface_to_vlans($realhwif), $wancfg['mtu']);
} else if (substr($realif, 0, 4) == 'lagg') {
/* LAGG interface must be destroyed and re-created to change MTU */
if ($wancfg['mtu'] != get_interface_mtu($realif)) {
OpenPOWER on IntegriCloud