projects
/
pve-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a75193
)
improve random MAC address generation
author
Dietmar Maurer
<dietmar@proxmox.com>
Wed, 22 Jan 2014 06:34:33 +0000
(07:34 +0100)
committer
Dietmar Maurer
<dietmar@proxmox.com>
Wed, 22 Jan 2014 06:34:33 +0000
(07:34 +0100)
data/PVE/Tools.pm
patch
|
blob
|
history
diff --git
a/data/PVE/Tools.pm
b/data/PVE/Tools.pm
index
f8e9c47
..
622f8ad
100644
(file)
--- a/
data/PVE/Tools.pm
+++ b/
data/PVE/Tools.pm
@@
-882,7
+882,9
@@
sub decode_utf8_parameters {
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 = '';
for (my $i = 0; $i < 6; $i++) {