mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-27 17:23:48 +00:00
improve random MAC address generation
This commit is contained in:
parent
2a75193897
commit
46a11c0030
@ -882,7 +882,9 @@ sub decode_utf8_parameters {
|
|||||||
|
|
||||||
sub random_ether_addr {
|
sub random_ether_addr {
|
||||||
|
|
||||||
my $rand = Digest::SHA::sha1_hex(rand(), time());
|
my ($seconds, $microseconds) = gettimeofday;
|
||||||
|
|
||||||
|
my $rand = Digest::SHA::sha1_hex($$, rand(), $seconds, $microseconds);
|
||||||
|
|
||||||
my $mac = '';
|
my $mac = '';
|
||||||
for (my $i = 0; $i < 6; $i++) {
|
for (my $i = 0; $i < 6; $i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user