aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linuxkpi')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/etherdevice.h3
-rw-r--r--sys/compat/linuxkpi/common/include/linux/random.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/etherdevice.h b/sys/compat/linuxkpi/common/include/linux/etherdevice.h
index 71ff97958024..392f395a5feb 100644
--- a/sys/compat/linuxkpi/common/include/linux/etherdevice.h
+++ b/sys/compat/linuxkpi/common/include/linux/etherdevice.h
@@ -108,8 +108,7 @@ eth_zero_addr(u8 *pa)
static inline void
random_ether_addr(u8 * dst)
{
- if (read_random(dst, 6) == 0)
- arc4rand(dst, 6, 0);
+ arc4random_buf(dst, 6);
dst[0] &= 0xfe;
dst[0] |= 0x02;
diff --git a/sys/compat/linuxkpi/common/include/linux/random.h b/sys/compat/linuxkpi/common/include/linux/random.h
index 04729319aaad..756277c5fcbc 100644
--- a/sys/compat/linuxkpi/common/include/linux/random.h
+++ b/sys/compat/linuxkpi/common/include/linux/random.h
@@ -39,8 +39,7 @@ static inline void
get_random_bytes(void *buf, int nbytes)
{
- if (read_random(buf, nbytes) == 0)
- arc4rand(buf, nbytes, 0);
+ arc4random_buf(buf, nbytes);
}
static inline u_int