diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-14 14:55:19 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-14 14:58:12 -0200 |
commit | 3be3dec9601f1baf2125f2931b2d03de8eda5854 (patch) | |
tree | d93e56572f76ce58b9068e8f6a4e8ef927c6f303 | |
parent | 11e9a8033efb43fd44b21dc11798a3288c3a003e (diff) | |
download | pfsense-3be3dec9601f1baf2125f2931b2d03de8eda5854.zip pfsense-3be3dec9601f1baf2125f2931b2d03de8eda5854.tar.gz |
When parent of a VLAN is LAGG and need to set a different MTU, interface must be re-created
-rw-r--r-- | src/etc/inc/interfaces.inc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index c3568ca..55ee1c3 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3316,7 +3316,20 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven $parentmtu = interface_vlan_mtu_configured($mtuhwif, $wantedmtu); if (get_interface_mtu($mtuhwif) != $parentmtu) { - pfSense_interface_mtu($mtuhwif, $parentmtu); + /* LAGG interface must be destroyed and re-created to change MTU */ + if (substr($mtuhwif, 0, 4) == 'lagg') { + if (isset($config['laggs']['lagg']) && + is_array($config['laggs']['lagg'])) { + foreach ($config['laggs']['lagg'] as $lagg) { + if ($lagg['laggif'] == $mtuhwif) { + interface_lagg_configure($lagg); + break; + } + } + } + } else { + pfSense_interface_mtu($mtuhwif, $parentmtu); + } } /* All vlans need to use the same mtu value as their parent. */ |