improve random MAC address generation

This commit is contained in:
Dietmar Maurer 2014-01-22 07:34:33 +01:00
parent 2a75193897
commit 46a11c0030

View File

@ -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++) {