]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
Prevent MTU from being set to 1500 on interface downing.
authorSam Tannous <stannous@cumulusnetworks.com>
Wed, 18 Mar 2015 01:59:15 +0000 (21:59 -0400)
committerSam Tannous <stannous@cumulusnetworks.com>
Wed, 18 Mar 2015 02:31:35 +0000 (22:31 -0400)
MTU settings are defaulted 1500 when interface is ifdowned.
This has the effect of changing the MTU on the interface and any subinterfaces to
1500.  And if these subinterfaces are in a bridge, the bridge will pick the MIN MTU
so the bridge keeps this MTU even after the interface is brought back up. The sub
interface does not change to a higher value then 1500 (kernel VLAN driver only
moves the MTU is the decreasing direction.
(cherry picked from commit 70e67ab15efb13e1499288152d801b39f28a190b)
(cherry picked from commit 56238543a980e983957a180c583b9412c3ab48ab)

ifupdown2/addons/address.py

index 627837e6fd73c90877c34deb5647a2daea6bf4d5..947487f1dd55ecbb467f370f839e35edc3b49cfc 100644 (file)
@@ -204,10 +204,6 @@ class address(moduleBase):
                     ifaceobj.get_attr_value_first('gateway'),
                     ifaceobj.get_attr_value_first('metric'))
                 self.ipcmd.del_addr_all(ifaceobj.name)
-            mtu = ifaceobj.get_attr_value_first('mtu')
-            if mtu:
-                self.ipcmd.link_set(ifaceobj.name, 'mtu',
-                        self.get_mod_subattr('mtu', 'default'))
             alias = ifaceobj.get_attr_value_first('alias')
             if alias:
                 self.ipcmd.link_set(ifaceobj.name, 'alias', "\'\'")