5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2024-12-22 13:34:16 +03:00

esxi: use mac address when static, generated and vpx

static -> defined manually
generated -> by ESXi
vpx -> generated by vCenter

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
Aaron Lauterer 2024-03-26 13:04:38 +01:00 committed by Thomas Lamprecht
parent 291f8c7dbc
commit b29a8c3596

View File

@ -793,7 +793,7 @@ sub for_each_netdev {
my $ty = $dev->{addressType}; my $ty = $dev->{addressType};
my $mac = $dev->{address}; my $mac = $dev->{address};
if ($ty && fc($ty) eq fc('generated')) { if ($ty && fc($ty) =~ /^(static|generated|vpx)$/) {
$mac = $dev->{generatedAddress} // $mac; $mac = $dev->{generatedAddress} // $mac;
} }