diff options
author | Erland Schönbeck <[email protected]> | 2015-04-24 12:56:39 +0200 |
---|---|---|
committer | Erland Schönbeck <[email protected]> | 2015-04-24 12:56:39 +0200 |
commit | e5228853fd16f9817bc26a82730c697fc0ecdf34 (patch) | |
tree | 401a385a01f6bdec013d6a167caaef216467309e /lib/snmp/src/agent/snmp_standard_mib.erl | |
parent | c46ae84ffd858c8fa8ddb3bfbfb3607276173fb4 (diff) | |
download | otp-e5228853fd16f9817bc26a82730c697fc0ecdf34.tar.gz otp-e5228853fd16f9817bc26a82730c697fc0ecdf34.tar.bz2 otp-e5228853fd16f9817bc26a82730c697fc0ecdf34.zip |
snmp: Change to random use crypto. Remove use of erlang:now
Diffstat (limited to 'lib/snmp/src/agent/snmp_standard_mib.erl')
-rw-r--r-- | lib/snmp/src/agent/snmp_standard_mib.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/snmp/src/agent/snmp_standard_mib.erl b/lib/snmp/src/agent/snmp_standard_mib.erl index aace3fd413..53f733ae4e 100644 --- a/lib/snmp/src/agent/snmp_standard_mib.erl +++ b/lib/snmp/src/agent/snmp_standard_mib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2014. All Rights Reserved. +%% Copyright Ericsson AB 1996-2015. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -546,8 +546,9 @@ dummy(_Op) -> ok. %%----------------------------------------------------------------- snmp_set_serial_no(new) -> snmp_generic:variable_func(new, {snmpSetSerialNo, volatile}), - {A1,A2,A3} = erlang:now(), - random:seed(A1,A2,A3), + random:seed(erlang:phash2([node()]), + erlang:monotonic_time(), + erlang:unique_integer()), Val = random:uniform(2147483648) - 1, snmp_generic:variable_func(set, Val, {snmpSetSerialNo, volatile}); |