diff options
author | Chris Rowe <chris@c-c-c.co.uk> | 2016-04-24 23:24:15 +0100 |
---|---|---|
committer | Chris Rowe <chris@c-c-c.co.uk> | 2016-04-24 23:24:15 +0100 |
commit | be92f5cb51602279cf7e40b75f862a997ff3d23f (patch) | |
tree | 8b48892f93867fc23b2edc64802ccf7273b04a2c /src | |
parent | 641b5618a764f5b6d56ab72eb7095666d37826b9 (diff) | |
download | pfsense-be92f5cb51602279cf7e40b75f862a997ff3d23f.zip pfsense-be92f5cb51602279cf7e40b75f862a997ff3d23f.tar.gz |
Fix issue with QinQ on LAGG interfaces where MTU doesn't apply to parent correctly
Diffstat (limited to 'src')
-rw-r--r-- | src/etc/inc/interfaces.inc | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index cefa7ab..9731a82 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -4971,6 +4971,7 @@ function interface_find_child_cfgmtu($realiface) { $interface = convert_real_interface_to_friendly_interface_name($realiface); $vlans = link_interface_to_vlans($realiface); + $qinqs = link_interface_to_qinqs($realiface); $bridge = link_interface_to_bridge($realiface); if (!empty($interface)) { $gifs = link_interface_to_gif($interface); @@ -4994,6 +4995,19 @@ function interface_find_child_cfgmtu($realiface) { } } } + if (is_array($qinqs)) { + foreach ($qinqs as $qinq) { + $ifass = convert_real_interface_to_friendly_interface_name($qinq['vlanif']); + if (empty($ifass)) { + continue; + } + if (!empty($config['interfaces'][$ifass]['mtu'])) { + if (intval($config['interfaces'][$ifass]['mtu']) > $mtu) { + $mtu = intval($config['interfaces'][$ifass]['mtu']); + } + } + } + } if (is_array($gifs)) { foreach ($gifs as $gif) { $ifass = convert_real_interface_to_friendly_interface_name($gif['gifif']); @@ -5055,6 +5069,30 @@ function link_interface_to_vlans($int, $action = "") { } } +function link_interface_to_qinqs($int, $action = "") { + global $config; + + if (empty($int)) { + return; + } + + if (is_array($config['qinqs']['qinqentry'])) { + $ifaces = array(); + foreach ($config['qinqs']['qinqentry'] as $qinq) { + if ($int == $qinq['if']) { + if ($action == "update") { + interfaces_bring_up($int); + } else { + $ifaces[$qinq['tag']] = $qinq; + } + } + } + if (!empty($ifaces)) { + return $ifaces; + } + } +} + function link_interface_to_vips($int, $action = "", $vhid = '') { global $config; |