summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/selftest/ratelimiter.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/selftest/ratelimiter.h b/src/selftest/ratelimiter.h
index 0bdff1e..c05eac7 100644
--- a/src/selftest/ratelimiter.h
+++ b/src/selftest/ratelimiter.h
@@ -121,6 +121,8 @@ restart:
#endif
}
+ tries = 0;
+restart2:
gc_entries(NULL);
rcu_barrier();
@@ -130,8 +132,11 @@ restart:
for (i = 0; i <= max_entries; ++i) {
hdr4->saddr = htonl(i);
- if (ratelimiter_allow(skb4, &init_net) != (i != max_entries))
+ if (ratelimiter_allow(skb4, &init_net) != (i != max_entries)) {
+ if (++tries < 5000)
+ goto restart2;
goto err;
+ }
++test;
}