summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-07-12 15:12:06 -0500
committerChris Buechler <cmb@pfsense.org>2016-07-12 15:12:06 -0500
commite1f0ea2e32d5d7b28bd78d208872ea564c2d6917 (patch)
tree4a171d41d1372f3f8ab13e17185fc2d3bc9e822a /src/etc
parent5a9c3449a8ba187d2b0959eacccdabb13ca05dd4 (diff)
parentbe92f5cb51602279cf7e40b75f862a997ff3d23f (diff)
downloadpfsense-e1f0ea2e32d5d7b28bd78d208872ea564c2d6917.zip
pfsense-e1f0ea2e32d5d7b28bd78d208872ea564c2d6917.tar.gz
Merge pull request #2905 from Chrisc-c-c/LAGG-MTU
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/interfaces.inc38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index fc8bbc0..a4d0825 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -4970,6 +4970,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);
@@ -4993,6 +4994,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']);
@@ -5054,6 +5068,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;
OpenPOWER on IntegriCloud