Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/net80211 Use cprng_strong32 as arc4random is obsol...



details:   https://anonhg.NetBSD.org/src-all/rev/b9b8e93c4795
branches:  trunk
changeset: 988750:b9b8e93c4795
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Wed May 13 12:08:53 2020 +1000

description:
Use cprng_strong32 as arc4random is obsolete.  From riastradh@.

diffstat:

 sys/net80211/ieee80211.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 3cfd06a9d1ef -r b9b8e93c4795 sys/net80211/ieee80211.c
--- a/sys/net80211/ieee80211.c  Wed May 13 00:19:20 2020 +1000
+++ b/sys/net80211/ieee80211.c  Wed May 13 12:08:53 2020 +1000
@@ -48,6 +48,7 @@
 #include <sys/malloc.h>
 #include <sys/socket.h>
 #include <sys/sbuf.h>
+#include <sys/cprng.h>
 
 #ifdef __FreeBSD__
 #include <machine/stdarg.h>
@@ -425,7 +426,7 @@
        ic->ic_update_promisc = null_update_promisc;
        ic->ic_update_chw = null_update_chw;
 
-       ic->ic_hash_key = arc4random();
+       ic->ic_hash_key = cprng_strong32();
        ic->ic_bintval = IEEE80211_BINTVAL_DEFAULT;
        ic->ic_lintval = ic->ic_bintval;
        ic->ic_txpowlimit = IEEE80211_TXPOWER_MAX;



Home | Main Index | Thread Index | Old Index