From 9ab24843eb1206e49bc1c5b8f15c5b3e9ceba2ce Mon Sep 17 00:00:00 2001 From: Sam Tannous Date: Tue, 17 Mar 2015 21:59:15 -0400 Subject: [PATCH] Prevent MTU from being set to 1500 on interface downing. 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 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ifupdown2/addons/address.py b/ifupdown2/addons/address.py index 627837e..947487f 100644 --- a/ifupdown2/addons/address.py +++ b/ifupdown2/addons/address.py @@ -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', "\'\'")