summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-03-07 11:40:02 +0000
committerErmal <eri@pfsense.org>2013-03-07 11:40:02 +0000
commitd35233daed0f99e4e3a1a22823422e0585f7f017 (patch)
tree0ccf2f0717165bfefaf8a0d7fd7a6af3692093a0 /etc
parentf42193a4310d4c059d8d1d66b8ec2406495384ed (diff)
downloadpfsense-d35233daed0f99e4e3a1a22823422e0585f7f017.zip
pfsense-d35233daed0f99e4e3a1a22823422e0585f7f017.tar.gz
Correct this behaviour of properly honoring the configured mtu
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc27
1 files changed, 14 insertions, 13 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 17bc995..98d0bab 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2895,19 +2895,20 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
$mtu = get_interface_default_mtu(remove_ifindex($realhwif));
- if (preg_match('/_vlan[0-9]/', $wancfg['if'])) {
- foreach ($config['interfaces'] as $ifdescr => $ifdata) {
- if ($ifdata['if'] == $realhwif) {
- if (!empty($ifdata['mtu']))
- $mtu = $ifdata['mtu'];
- break;
- }
- }
- } else if (!empty($wancfg['mtu'])) {
- $mtu = $wancfg['mtu'];
- }
-
- if ($mtu != get_interface_mtu($realhwif))
+ if (!empty($wancfg['mtu'])) {
+ if (stristr($realif, "vlan")) {
+ $assginedparent = convert_real_interface_to_friendly_interface_name($realhwif);
+ if (!empty($assginedparent)) {
+ $parentmtu = $config['interfaces'][$assginedparent]['mtu'];
+ if (empty($parentmtu))
+ $parentmtu = get_interface_mtu($realhwif);
+ if ($wancfg['mtu'] > $parentmtu)
+ pfSense_interface_mtu($realhwif, $wancfg['mtu']);
+ } else if ($mtu != get_interface_mtu($realhwif))
+ pfSense_interface_mtu($realhwif, $mtu);
+ } else if ($mtu != get_interface_mtu($realhwif))
+ pfSense_interface_mtu($realhwif, $mtu);
+ } else if ($mtu != get_interface_mtu($realhwif))
pfSense_interface_mtu($realhwif, $mtu);
/*
OpenPOWER on IntegriCloud