summaryrefslogtreecommitdiffstatshomepage
path: root/src/wireguard.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-08-21 20:13:17 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-08-22 01:47:28 +0200
commitd2a8e52e8574d24670f205ed6d2a6c78e1f5da2f (patch)
tree9e115056e0be48f9fd0eca45ba2d91e3bf251fdf /src/wireguard.h
parenttests: test jumbo frames with more transfer (diff)
downloadwireguard-monolithic-historical-d2a8e52e8574d24670f205ed6d2a6c78e1f5da2f.tar.xz
wireguard-monolithic-historical-d2a8e52e8574d24670f205ed6d2a6c78e1f5da2f.zip
hashtables: use rdrand() instead of counter
Diffstat (limited to '')
-rw-r--r--src/wireguard.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wireguard.h b/src/wireguard.h
index 5c83ab6..2985323 100644
--- a/src/wireguard.h
+++ b/src/wireguard.h
@@ -36,6 +36,10 @@
#define net_dbg_ratelimited(fmt, ...) do { if (0) no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0)
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
+#define get_random_long() (((u64)get_random_int() << 32) | get_random_int())
+#endif
+
struct wireguard_device {
struct sock __rcu *sock4, *sock6;
u16 incoming_port;