aboutsummaryrefslogtreecommitdiffstats
path: root/TODO.md
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@noconroy.net>2021-04-23 13:15:49 +1000
committerMatt Dunwoodie <ncon@noconroy.net>2021-04-23 13:15:49 +1000
commit7a7eb567d7ca1736288305708ea9ee03e8bc4511 (patch)
tree06e7a606d28279c1b0e3efdd7edfde6f729cdac2 /TODO.md
parentwg_cookie: cleanup internal code (diff)
downloadwireguard-freebsd-7a7eb567d7ca1736288305708ea9ee03e8bc4511.tar.xz
wireguard-freebsd-7a7eb567d7ca1736288305708ea9ee03e8bc4511.zip
wg_cookie: allocate ratelimit table statically
We can simplify the ratelimit init/deinit calls by allocating the table statically, that is by not using hashinit_flags. That function ended up doing some unnecessary calculation and meant that the mask couldn't be constant. By increasing the size of struct ratelimit, this also caught a nasty (but benign) bug, where ratelimit_pool was initialised to allocate sizeof(struct ratelimit) and not sizeof(struct ratelimit_entry). It has been this way since FreeBSD tree and I didn't pick up on it while moving the uma_zcreate call to wg_cookie. Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
Diffstat (limited to 'TODO.md')
0 files changed, 0 insertions, 0 deletions