selftests: fixup headers

Also remove the stale entry from the TODO list.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2021-04-21 21:22:18 -06:00
parent b132f7d89d
commit eb2d6d7d14
4 changed files with 14 additions and 12 deletions

View File

@ -7,7 +7,6 @@
- Work out `priv_check` from vnet perspective. (There's no `ns_capable()` on
FreeBSD, just `capable()`, which makes it a bit weird for one jail to have
permissions in another.)
- Port ratelimiter and counter [selftests](https://git.zx2c4.com/wireguard-linux/tree/drivers/net/wireguard/selftest).
- Make code style consistent with one FreeBSD way, rather than a mix of styles.
- Run ratelimiter gc in a properly scheduled manner.
- Make sure noise state machine is correct.

View File

@ -1,17 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
/*
/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2015-2021 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/systm.h>
#include <sys/queue.h>
#include <sys/endian.h>
#include <netinet/in.h>
#include <net/radix.h>
#ifdef WG_ALLOWEDIPS_RANDOMIZED_TEST
enum {
NUM_PEERS = 2000,

View File

@ -1,3 +1,9 @@
/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2015-2021 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
* Copyright (C) 2019-2021 Matt Dunwoodie <ncon@noconroy.net>
*/
#define MESSAGE_LEN 64
#define T_FAILED_ITER(test) do { \
printf("%s %s: fail, iter: %d\n", __func__, test, i); \

View File

@ -1,3 +1,9 @@
/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2015-2021 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
* Copyright (C) 2019-2021 Matt Dunwoodie <ncon@noconroy.net>
*/
#define T_LIM (COUNTER_WINDOW_SIZE + 1)
#define T_INIT do { \
bzero(&kp, sizeof(kp)); \