diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-08 21:44:18 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-17 18:07:42 +0200 |
commit | 42bc9b33922816b67dd926a836fc0b83269a24d2 (patch) | |
tree | c9cd873199c38580d451a025091279dc9ca8d85f /src/compat/compat.h | |
parent | compat: work around ubnt offloading (diff) | |
download | wireguard-monolithic-historical-42bc9b33922816b67dd926a836fc0b83269a24d2.tar.xz wireguard-monolithic-historical-42bc9b33922816b67dd926a836fc0b83269a24d2.zip |
compat: use real crypto_memneq
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r-- | src/compat/compat.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index 5d5f714..31ff0b5 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -194,20 +194,6 @@ static inline u32 prandom_u32_max(u32 ep_ro) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 59) -static inline int crypto_memneq(const void *a, const void *b, size_t size) -{ - unsigned long neq = 0; - while (size > 0) { - neq |= *(u8 *)a ^ *(u8 *)b; - a += 1; - b += 1; - size -= 1; - } - return neq != 0UL ? 1 : 0; -} -#endif - #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 75) #define U8_MAX ((u8)~0U) #define S8_MAX ((s8)(U8_MAX >> 1)) |