diff options
author | Matt Dunwoodie <ncon@noconroy.net> | 2021-04-23 14:23:08 +1000 |
---|---|---|
committer | Matt Dunwoodie <ncon@noconroy.net> | 2021-04-23 14:40:32 +1000 |
commit | 78dc3f1bd0cf4ff478e1c71970248d24e155ed13 (patch) | |
tree | 6608b935f4807f93d65a7f7a4e1feeb82a908c62 /COPYING | |
parent | if_wg: check wg_module_init succeeded (diff) | |
download | wireguard-freebsd-78dc3f1bd0cf4ff478e1c71970248d24e155ed13.tar.xz wireguard-freebsd-78dc3f1bd0cf4ff478e1c71970248d24e155ed13.zip |
if_wg: remove M_WAITOK, check return codes on init
Here we remove all M_WAITOK checks, because we don't want to hang while
trying to allocate memory. It is better to return an error so the user
can try again later.
We also make sure to check all the return codes in peer and interface
allocation. The structure of those functions is:
1) Allocate all memory
2) Initialise fields in order of the struct
3) Cleanup gotos
Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions