aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/main.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-06-25 01:28:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-06-25 16:48:39 +0200
commit3e8c04a03f4070e23fc737f30c25a79d5958d734 (patch)
tree23354ba5aec33b7068421524c3e514767a1e42fb /src/main.c
parentnonce: switch to RFC6479 to better support packet reordering (diff)
downloadwireguard-monolithic-historical-3e8c04a03f4070e23fc737f30c25a79d5958d734.tar.xz
wireguard-monolithic-historical-3e8c04a03f4070e23fc737f30c25a79d5958d734.zip
tests: make fatal
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index bcc432a..e0116c8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,12 +17,13 @@ static int __init mod_init(void)
int ret = 0;
#ifdef DEBUG
- routing_table_selftest();
- packet_counter_selftest();
- curve25519_selftest();
- chacha20poly1305_selftest();
- blake2s_selftest();
- siphash24_selftest();
+ if (!routing_table_selftest() ||
+ !packet_counter_selftest() ||
+ !curve25519_selftest() ||
+ !chacha20poly1305_selftest() ||
+ !blake2s_selftest() ||
+ !siphash24_selftest())
+ return -ENOTRECOVERABLE;
#endif
chacha20poly1305_init();
noise_init();