From 32f664077d1012c42e0544ccb5a4e1456f783998 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 7 Oct 2026 19:56:53 +0200 Subject: ethernet: T3871: leave a bond member's MTU alone while it is still enslaved Deleting the ethernet configuration of a member of a jumbo bond dropped that member to the default MTU while the bond went on using it at 9000. It stayed the active slave, so jumbo frames were discarded in both directions, small ones passed, and nothing was logged. A bond owns its members' MTU just as it owns their address - the ethernet path already refuses to let a member set either, and says so. The reset now waits, like the address, until the bond has released the port. The bonding smoketest covers both halves on a running system: while the member is enslaved it must keep the bond's address and MTU, and once the bond releases it, it must get its own address and the default MTU back. --- python/vyos/ifconfig/ethernet.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'python') diff --git a/python/vyos/ifconfig/ethernet.py b/python/vyos/ifconfig/ethernet.py index 8360c4654..2f53b5e06 100644 --- a/python/vyos/ifconfig/ethernet.py +++ b/python/vyos/ifconfig/ethernet.py @@ -156,21 +156,18 @@ class EthernetIf(Interface): if not self.exists(self.ifname): return - # undo what the configuration changed about the hardware itself. - # - # While the port is still enslaved its address belongs to the bond - - # most modes need every member to carry the bond's one, and set_mac() - # would bounce the link underneath it. BondIf.update() releases the - # member and then runs this cleanup again, which is where the address - # is put back. + # undo what the configuration changed about the hardware itself, but + # not while the port is still enslaved: a bond owns its members' + # address and MTU, so resetting them here would leave the member out + # of step with the bond it is still in. Releasing it runs this again. tmp = get_interface_config(self.ifname) if dict_search('linkinfo.info_slave_kind', tmp) != 'bond': mac = permanent_mac(self.ifname) if mac: self.set_mac(mac) - mtu = min(int(EthernetIf.DEFAULT_MTU), int(self.get_max_mtu())) - self.set_mtu(str(mtu)) + mtu = min(int(EthernetIf.DEFAULT_MTU), int(self.get_max_mtu())) + self.set_mtu(str(mtu)) self.set_admin_state('up') -- cgit v1.2.3