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/c5c5f5c19159
branches:  trunk
changeset: 933425:c5c5f5c19159
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 a366aff4f5cd -r c5c5f5c19159 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
@@ -49,6 +49,7 @@
 #include <sys/malloc.h>
 #include <sys/socket.h>
 #include <sys/sbuf.h>
+#include <sys/cprng.h>
 
 #ifdef __FreeBSD__
 #include <machine/stdarg.h>
@@ -426,7 +427,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