diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-11-26 15:41:53 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-11-26 15:41:53 +0100 |
commit | e2fcd0e3027c545eb1beeb91f4ef9231a2200c42 (patch) | |
tree | d54c4ccd6e0caaf5bf958e1bd16794d88e61d6b7 /etc/inc/interfaces.inc | |
parent | cb054444fd3f527f7a1f9fdb30304da292390663 (diff) | |
download | pfsense-e2fcd0e3027c545eb1beeb91f4ef9231a2200c42.zip pfsense-e2fcd0e3027c545eb1beeb91f4ef9231a2200c42.tar.gz |
Skip the interface being configured from the list to check the mtu
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index e74e3af..3cdeca8 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2760,13 +2760,16 @@ function find_dhcp6c_process($interface) { return intval($pid); } -function interface_vlan_mtu_configured($realhwif, $mtu) { +function interface_vlan_mtu_configured($realhwif, $mtu, $vlanskip = '') { 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) @@ -3000,7 +3003,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven $parentmtu = $config['interfaces'][$assignedparent]['mtu']; else { $parentmtu = get_interface_mtu($realhwif); - $parentmtu = interface_vlan_mtu_configured($realhwif, $parentmtu); + $parentmtu = interface_vlan_mtu_configured($realhwif, $parentmtu, $realif); } if ($wancfg['mtu'] > $parentmtu) { |