From 8b2a1ea49498e9a0b6df96c5017583ff8a1d199c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 9 Aug 2016 01:32:48 +0200 Subject: ratelimiter: hard-depend on runtime dependencies Signed-off-by: Jason A. Donenfeld --- src/ratelimiter.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ratelimiter.c') 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 #include +#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 -- cgit v1.2.3