summaryrefslogtreecommitdiffstats
path: root/package/hostapd/patches/700-random_pool_add_kernel.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/hostapd/patches/700-random_pool_add_kernel.patch')
-rw-r--r--package/hostapd/patches/700-random_pool_add_kernel.patch18
1 files changed, 10 insertions, 8 deletions
diff --git a/package/hostapd/patches/700-random_pool_add_kernel.patch b/package/hostapd/patches/700-random_pool_add_kernel.patch
index 1edaff9e7..8475ac623 100644
--- a/package/hostapd/patches/700-random_pool_add_kernel.patch
+++ b/package/hostapd/patches/700-random_pool_add_kernel.patch
@@ -1,6 +1,6 @@
--- a/src/crypto/random.c
+++ b/src/crypto/random.c
-@@ -47,6 +47,8 @@
+@@ -48,6 +48,8 @@
#define EXTRACT_LEN 16
#define MIN_READY_MARK 2
@@ -9,7 +9,7 @@
static u32 pool[POOL_WORDS];
static unsigned int input_rotate = 0;
static unsigned int pool_pos = 0;
-@@ -120,7 +122,7 @@ static void random_extract(u8 *out)
+@@ -122,7 +124,7 @@ static void random_extract(u8 *out)
}
@@ -18,9 +18,9 @@
{
struct os_time t;
static unsigned int count = 0;
-@@ -260,3 +262,22 @@ void random_mark_pool_ready(void)
- wpa_printf(MSG_DEBUG, "random: Mark internal entropy pool to be "
- "ready (count=%u/%u)", own_pool_ready, MIN_READY_MARK);
+@@ -335,3 +337,22 @@ void random_deinit(void)
+ random_close_fd();
+ #endif /* __linux__ */
}
+
+#endif /* CONFIG_NO_RANDOM_POOL */
@@ -101,15 +101,17 @@
L_CFLAGS += -DRADIUS_SERVER
--- a/src/crypto/random.h
+++ b/src/crypto/random.h
-@@ -16,15 +16,14 @@
- #define RANDOM_H
-
+@@ -18,17 +18,16 @@
#ifdef CONFIG_NO_RANDOM_POOL
+ #define random_init() do { } while (0)
+ #define random_deinit() do { } while (0)
-#define random_add_randomness(b, l) do { } while (0)
#define random_get_bytes(b, l) os_get_random((b), (l))
#define random_pool_ready() 1
#define random_mark_pool_ready() do { } while (0)
#else /* CONFIG_NO_RANDOM_POOL */
+ void random_init(void);
+ void random_deinit(void);
-void random_add_randomness(const void *buf, size_t len);
int random_get_bytes(void *buf, size_t len);
int random_pool_ready(void);