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/c39497f89652
branches:  trunk
changeset: 986404:c39497f89652
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 c3a4dc308806 -r c39497f89652 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