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/d0d454f21655
branches:  trunk
changeset: 1025239:d0d454f21655
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 ea20ba1a6813 -r d0d454f21655 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