diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-10-07 19:56:53 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-10-31 09:58:29 +0000 |
| commit | 32f664077d1012c42e0544ccb5a4e1456f783998 (patch) | |
| tree | 891808afbe789a4005ed5ed462839b8c8bc482dd /python | |
| parent | f5c844e8a6c2238555b8e519fe929a64e56b3388 (diff) | |
| download | vyos-1x-32f664077d1012c42e0544ccb5a4e1456f783998.tar.gz vyos-1x-32f664077d1012c42e0544ccb5a4e1456f783998.zip | |
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.
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/ifconfig/ethernet.py | 15 |
1 files changed, 6 insertions, 9 deletions
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') |
