Commit 22021784 authored by Mark Karpilovskij's avatar Mark Karpilovskij

tests: RRL Limited request test repaired

Repairs the limited request tests according to the patch in commit a3dd3072
parent 8db6beba
......@@ -30,7 +30,6 @@
#define RRL_V4_PREFIX ((uint32_t)0x00ffffff) /* /24 */
#define RRL_V6_PREFIX ((uint64_t)0x00ffffffffffffff) /* /56 */
/* Defaults */
#define RRL_CAPACITY 4 /* N seconds. */
#define RRL_SSTART 2 /* 1/Nth of the rate for slow start */
#define RRL_PSIZE_LARGE 1024
......
......@@ -26,6 +26,7 @@
/* Defaults */
#define RRL_SLIP_MAX 100
#define RRL_LOCK_GRANULARITY 32 /* Last digit granularity */
#define RRL_CAPACITY 4 /* Window size in seconds */
/*!
* \brief RRL hash bucket.
......
......@@ -146,7 +146,7 @@ int main(int argc, char *argv[])
sockaddr_set(&addr, AF_INET, "1.2.3.4", 0);
sockaddr_set(&addr6, AF_INET6, "1122:3344:5566:7788::aabb", 0);
ret = 0;
for (unsigned i = 0; i < rate; ++i) {
for (unsigned i = 0; i < rate * RRL_CAPACITY; ++i) {
if (rrl_query(rrl, &addr, &rq, zone, NULL) != KNOT_EOK ||
rrl_query(rrl, &addr6, &rq, zone, NULL) != KNOT_EOK) {
ret = KNOT_ELIMIT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment