aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/ratelimiter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ratelimiter.h')
-rw-r--r--src/ratelimiter.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ratelimiter.h b/src/ratelimiter.h
index e23097d..d934eab 100644
--- a/src/ratelimiter.h
+++ b/src/ratelimiter.h
@@ -10,12 +10,17 @@ struct sk_buff;
struct ratelimiter {
struct net *net;
- struct xt_match *v4_match, *v6_match;
- struct xt_hashlimit_mtinfo1 v4_info, v6_info;
+ struct xt_hashlimit_mtinfo1 v4_info;
+#if IS_ENABLED(CONFIG_IPV6)
+ struct xt_hashlimit_mtinfo1 v6_info;
+#endif
};
int ratelimiter_init(struct ratelimiter *ratelimiter, struct wireguard_device *wg);
void ratelimiter_uninit(struct ratelimiter *ratelimiter);
bool ratelimiter_allow(struct ratelimiter *ratelimiter, struct sk_buff *skb);
+int ratelimiter_module_init(void);
+void ratelimiter_module_deinit(void);
+
#endif