[pve-devel] [PATCH qemu-server] cleanup: remove duplicate mac address assignment

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Mar 21 10:38:29 CET 2018


The git history of this is not immediately obvious due to
the date of the cloud init patches, but the removal of this
line was basically reverted by them later at merge-time.

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 PVE/QemuServer.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 5462d07..0711afb 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1970,9 +1970,8 @@ sub parse_net {
     if (!defined($res->{macaddr})) {
 	my $dc = PVE::Cluster::cfs_read_file('datacenter.cfg');
 	$res->{macaddr} = PVE::Tools::random_ether_addr($dc->{mac_prefix});
     }
-    $res->{macaddr} = PVE::Tools::random_ether_addr() if !defined($res->{macaddr});
     return $res;
 }
 
 # ipconfigX ip=cidr,gw=ip,ip6=cidr,gw6=ip
-- 
2.11.0




More information about the pve-devel mailing list