]> git.proxmox.com Git - ifupdown2.git/blame - debian/patches/upstream/0001-fix-bond-mac.patch
patch: fix bond mac address at boot.
[ifupdown2.git] / debian / patches / upstream / 0001-fix-bond-mac.patch
CommitLineData
a1a0ee38
AD
1From 062c3a6707b22cf7494bbf0ccb8ea6559dc334df Mon Sep 17 00:00:00 2001
2From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
3Date: Fri, 1 Sep 2023 09:43:05 +0200
4Subject: [PATCH] bond: fix mac-address on create with first slave mac
5
6since systemd v241, bond (like bridge), are create with a random mac
7instead their first slave.
8
9We already fixing it for bond on reload, but not at create
10
11Than mean that on first reload, we'll always ifdown/ifup interface and change mac.
12---
13 ifupdown2/addons/bond.py | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/ifupdown2/addons/bond.py b/ifupdown2/addons/bond.py
17index 74d2cab5..5e77e1b0 100644
18--- a/ifupdown2/addons/bond.py
19+++ b/ifupdown2/addons/bond.py
20@@ -884,7 +884,7 @@ def _up(self, ifaceobj, ifaceobj_getfunc=None):
21 ifaceobj_getfunc,
22 )
23
24- if not self.bond_mac_mgmt or not link_exists or ifaceobj.get_attr_value_first("hwaddress"):
25+ if not self.bond_mac_mgmt or ifaceobj.get_attr_value_first("hwaddress"):
26 return
27
28 # check if the bond mac address is correctly inherited from it's