The key in the ip link output is actually called linkinfo. Before this
patch, members of bond interfaces that inherit the MAC address of the
bond would have a wrong MAC in their generated .link file.

Signed-off-by: Stefan Hanreich <[email protected]>
---
 PVE/CLI/proxmox_network_interface_pinning.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/CLI/proxmox_network_interface_pinning.pm 
b/PVE/CLI/proxmox_network_interface_pinning.pm
index 382e2d94b..7f4e9f0ff 100644
--- a/PVE/CLI/proxmox_network_interface_pinning.pm
+++ b/PVE/CLI/proxmox_network_interface_pinning.pm
@@ -301,7 +301,7 @@ sub get_ip_link_mac {
 
     # members of bonds can have a different MAC than the physical interface, so
     # we need to check if they're enslaved
-    return $ip_link->{link_info}->{info_slave_data}->{perm_hwaddr} // 
$ip_link->{address};
+    return $ip_link->{linkinfo}->{info_slave_data}->{perm_hwaddr} // 
$ip_link->{address};
 }
 
 sub get_ip_links {
-- 
2.39.5


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to