From 745c0920443fa3389d251fa9d45cb768c11a4591 Mon Sep 17 00:00:00 2001 From: Heikki Hannikainen Date: Thu, 11 Oct 2012 22:43:32 +0300 Subject: [PATCH] allow testing with 40000 clients --- src/cellmalloc.c | 2 +- src/tools/eventload.c | 2 +- tests/cfg-aprsc/acl-all.acl | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cellmalloc.c b/src/cellmalloc.c index f998922..58de5c3 100644 --- a/src/cellmalloc.c +++ b/src/cellmalloc.c @@ -47,7 +47,7 @@ struct cellarena_t { int createsize; int cellblocks_count; -#define CELLBLOCKS_MAX 100 /* track client cell allocator limit! */ +#define CELLBLOCKS_MAX 200 /* track client cell allocator limit! */ char *cellblocks[CELLBLOCKS_MAX]; /* ref as 'char pointer' for pointer arithmetics... */ }; diff --git a/src/tools/eventload.c b/src/tools/eventload.c index 3291b65..79b35c6 100644 --- a/src/tools/eventload.c +++ b/src/tools/eventload.c @@ -205,7 +205,7 @@ void flood_round(struct floodthread_t *self) continue; } - sprintf(username, "%x", fd); + sprintf(username, "%03x%06x", getpid(), fd); wbufpos = snprintf(wbuf, WBUFLEN, "user %s pass %d\r\n", username, aprs_passcode(username)); int w = write(fd, wbuf, wbufpos); if (w != wbufpos) { diff --git a/tests/cfg-aprsc/acl-all.acl b/tests/cfg-aprsc/acl-all.acl index 1c72af2..d94d311 100644 --- a/tests/cfg-aprsc/acl-all.acl +++ b/tests/cfg-aprsc/acl-all.acl @@ -1,12 +1,12 @@ # acl -allow 127.0.0.1 +allow 127.0.0.0/24 allow 44.0.0.0/8 allow 83.145.252.0/24 allow 85.188.1.0/24 -allow ::1/128 +allow ::1/126 allow 2001:1bc8:101:1::/64