summaryrefslogtreecommitdiffhomepage
path: root/src/ratelimiter.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 03:54:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 18:51:34 +0200
commit2ae6cad8f509759e6ce8ca4e8a6c18ea5aabc605 (patch)
tree0c2b5d6796e2593e0fec676089f444707cd66035 /src/ratelimiter.c
parent1027c1fb4493130ed9df96fd4092c4bf9c599b82 (diff)
global: more nits
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/ratelimiter.c')
-rw-r--r--src/ratelimiter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ratelimiter.c b/src/ratelimiter.c
index 4e79032..a3d334b 100644
--- a/src/ratelimiter.c
+++ b/src/ratelimiter.c
@@ -62,13 +62,13 @@ static void wg_ratelimiter_gc_entries(struct work_struct *work)
for (i = 0; i < table_size; ++i) {
spin_lock(&table_lock);
- hlist_for_each_entry_safe (entry, temp, &table_v4[i], hash) {
+ hlist_for_each_entry_safe(entry, temp, &table_v4[i], hash) {
if (unlikely(!work) ||
now - entry->last_time_ns > NSEC_PER_SEC)
entry_uninit(entry);
}
#if IS_ENABLED(CONFIG_IPV6)
- hlist_for_each_entry_safe (entry, temp, &table_v6[i], hash) {
+ hlist_for_each_entry_safe(entry, temp, &table_v6[i], hash) {
if (unlikely(!work) ||
now - entry->last_time_ns > NSEC_PER_SEC)
entry_uninit(entry);
@@ -105,7 +105,7 @@ bool wg_ratelimiter_allow(struct sk_buff *skb, struct net *net)
else
return false;
rcu_read_lock();
- hlist_for_each_entry_rcu (entry, bucket, hash) {
+ hlist_for_each_entry_rcu(entry, bucket, hash) {
if (entry->net == net && entry->ip == data.ip) {
u64 now, tokens;
bool ret;