summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-08-09 01:32:48 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-08-09 01:32:48 +0200
commit8b2a1ea49498e9a0b6df96c5017583ff8a1d199c (patch)
treef85c7ba187c409adcd5f20c1fbe513d315bd2760 /src
parentc69837ad5d45c546b8f15c87480271a76359406a (diff)
ratelimiter: hard-depend on runtime dependencies
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/ratelimiter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ratelimiter.c b/src/ratelimiter.c
index ab366d2..042ae34 100644
--- a/src/ratelimiter.c
+++ b/src/ratelimiter.c
@@ -6,6 +6,13 @@
#include <net/ip.h>
#include <linux/module.h>
+#if !IS_ENABLED(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT)
+#error "WireGuard requires CONFIG_NETFILTER_XT_MATCH_HASHLIMIT."
+#endif
+#if IS_ENABLED(CONFIG_IPV6) && !IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
+#error "WireGuard requires CONFIG_IP6_NF_IPTABLES when using CONFIG_IPV6."
+#endif
+
enum {
RATELIMITER_PACKETS_PER_SECOND = 75,
RATELIMITER_PACKETS_BURSTABLE = 5