mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: address: set default mtu on user defined device (via link-type)
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -603,10 +603,12 @@ class address(moduleBase):
|
||||
return
|
||||
|
||||
if ifaceobj.link_kind:
|
||||
# bonds and vxlan devices need an explicit set of mtu.
|
||||
# bonds, vxlan and custom devices (like dummy) need an explicit set of mtu.
|
||||
# bridges don't need mtu set
|
||||
if (ifaceobj.link_kind & ifaceLinkKind.BOND or
|
||||
ifaceobj.link_kind & ifaceLinkKind.VXLAN):
|
||||
ifaceobj.link_kind & ifaceLinkKind.VXLAN or
|
||||
ifaceobj.link_kind & ifaceLinkKind.OTHER
|
||||
):
|
||||
running_mtu = self.ipcmd.link_get_mtu(ifaceobj.name)
|
||||
if (self.default_mtu and running_mtu != self.default_mtu):
|
||||
self.ipcmd.link_set(ifaceobj.name, 'mtu', self.default_mtu)
|
||||
|
||||
Reference in New Issue
Block a user