X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=package%2Fhostapd%2Fpatches%2F500-random_pool_add_kernel.patch;fp=package%2Fhostapd%2Fpatches%2F500-random_pool_add_kernel.patch;h=e54e881d8e73a4ee6c38272c41aad511f5df2f15;hp=5ef8f47ad12573785c9c487c6a021a527848874a;hb=16ed0ca7b4b505a3930edf93f28cbeee6c37f86c;hpb=1d37907499d822b301a174551698d0d027f76a83 diff --git a/package/hostapd/patches/500-random_pool_add_kernel.patch b/package/hostapd/patches/500-random_pool_add_kernel.patch index 5ef8f47ad1..e54e881d8e 100644 --- a/package/hostapd/patches/500-random_pool_add_kernel.patch +++ b/package/hostapd/patches/500-random_pool_add_kernel.patch @@ -1,6 +1,6 @@ --- a/src/crypto/random.c +++ b/src/crypto/random.c -@@ -32,6 +32,8 @@ +@@ -33,6 +33,8 @@ #include "sha1.h" #include "random.h" @@ -9,7 +9,7 @@ #define POOL_WORDS 32 #define POOL_WORDS_MASK (POOL_WORDS - 1) #define POOL_TAP1 26 -@@ -42,6 +44,8 @@ +@@ -43,6 +45,8 @@ #define EXTRACT_LEN 16 #define MIN_READY_MARK 2 @@ -18,7 +18,7 @@ static u32 pool[POOL_WORDS]; static unsigned int input_rotate = 0; static unsigned int pool_pos = 0; -@@ -122,7 +126,7 @@ static void random_extract(u8 *out) +@@ -123,7 +127,7 @@ static void random_extract(u8 *out) } @@ -27,7 +27,7 @@ { struct os_time t; static unsigned int count = 0; -@@ -191,16 +195,22 @@ int random_get_bytes(void *buf, size_t l +@@ -213,16 +217,22 @@ int random_get_bytes(void *buf, size_t l int random_pool_ready(void) { #ifdef __linux__ @@ -51,7 +51,7 @@ /* * Try to fetch some more data from the kernel high quality -@@ -235,6 +245,7 @@ int random_pool_ready(void) +@@ -257,6 +267,7 @@ int random_pool_ready(void) if (dummy_key_avail == sizeof(dummy_key)) { if (own_pool_ready < MIN_READY_MARK) own_pool_ready = MIN_READY_MARK; @@ -59,7 +59,7 @@ random_write_entropy(); return 1; } -@@ -247,6 +258,7 @@ int random_pool_ready(void) +@@ -269,6 +280,7 @@ int random_pool_ready(void) total_collected + 10 * own_pool_ready > MIN_COLLECT_ENTROPY) { wpa_printf(MSG_INFO, "random: Allow operation to proceed " "based on internal entropy"); @@ -67,7 +67,7 @@ return 1; } -@@ -262,10 +274,16 @@ int random_pool_ready(void) +@@ -284,10 +296,16 @@ int random_pool_ready(void) void random_mark_pool_ready(void) { @@ -84,7 +84,7 @@ } -@@ -422,3 +440,22 @@ void random_deinit(void) +@@ -444,3 +462,22 @@ void random_deinit(void) os_free(random_entropy_file); random_entropy_file = NULL; } @@ -109,7 +109,7 @@ +} --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile -@@ -1161,9 +1161,8 @@ endif +@@ -1217,9 +1217,8 @@ endif ifdef CONFIG_NO_RANDOM_POOL CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -122,7 +122,7 @@ ifeq ($(CONFIG_CTRL_IFACE), y) --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk -@@ -1139,9 +1139,8 @@ endif +@@ -1161,9 +1161,8 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL @@ -135,7 +135,7 @@ ifeq ($(CONFIG_CTRL_IFACE), y) --- a/hostapd/Android.mk +++ b/hostapd/Android.mk -@@ -724,11 +724,11 @@ endif +@@ -748,11 +748,11 @@ endif ifdef CONFIG_NO_RANDOM_POOL L_CFLAGS += -DCONFIG_NO_RANDOM_POOL else @@ -151,7 +151,7 @@ L_CFLAGS += -DRADIUS_SERVER --- a/hostapd/Makefile +++ b/hostapd/Makefile -@@ -719,12 +719,12 @@ endif +@@ -755,12 +755,12 @@ endif ifdef CONFIG_NO_RANDOM_POOL CFLAGS += -DCONFIG_NO_RANDOM_POOL else